又是一对串烧实验,布好线后非常方便就可以一起完成。

连线方案一模一样:

Lab 228 数码管骰子

核心代码如下:

def loop() :
global cnt
global btn_read,sec,on gpio.digital_write(channel[8],LOW)
gpio.digital_write(channel[9],LOW)
gpio.digital_write(channel[10],LOW)
gpio.digital_write(channel[11],HIGH)
display_digit(digit1)
delay(5)
cnt=cnt+5 btn_read=gpio.digital_read('gpio1')
if btn_read==1:
delay(20)
btn_read=gpio.digital_read('gpio1')
if btn_read ==1:
if on==1:
print("warning: stop here!")
on=0
else :
print("game begins!")
on=1 if cnt>=100 and on==1 :
cnt=0
get_digit()

视频地址如下:

http://v.youku.com/v_show/id_XMTI2MzM4NDk4MA==.html

Lab 222 秒表

核心代码如下:

gpio.digital_write(channel[8],HIGH)
gpio.digital_write(channel[9],LOW)
gpio.digital_write(channel[10],LOW)
gpio.digital_write(channel[11],LOW)
display_digit(digit4)
delay(5)
cnt = cnt + 5 gpio.digital_write(channel[8],LOW)
gpio.digital_write(channel[9],HIGH)
gpio.digital_write(channel[10],LOW)
gpio.digital_write(channel[11],LOW)
display_digit(digit3)
delay(5)
cnt=cnt+5 gpio.digital_write(channel[8],LOW)
gpio.digital_write(channel[9],LOW)
gpio.digital_write(channel[10],HIGH)
gpio.digital_write(channel[11],LOW)
display_digit(digit2)
gpio.digital_write(channel[2],LOW)
delay(5)
cnt=cnt+5 gpio.digital_write(channel[8],LOW)
gpio.digital_write(channel[9],LOW)
gpio.digital_write(channel[10],LOW)
gpio.digital_write(channel[11],HIGH)
display_digit(digit1)
delay(5)
cnt=cnt+5

视频地址如下:

http://v.youku.com/v_show/id_XMTI2MTE4MzAwNA==.html?f=25838393

唯一能说一说的经验就是:一般显示错误都是连线没连好(大雾)

我特么就是某个横杠一直显示不对,改了半天代码,最后换了根线就好了,(╯‵□′)╯︵┴─┴

Acadia Lab 228 + Lab 222的更多相关文章

  1. Innovus Lab和Lab Guide下载地址 | Innovus教程 - Flow系列 - 数据准备

    本文转自:自己的微信公众号<集成电路设计及EDA教程> <Innovus Lab和Lab Guide下载地址 |    Innovus教程 - Flow系列 - 数据准备>   ...

  2. Acadia Lab 203 + Lab 231

    在做完 Lab 6 之后,惊觉选做实验缺口很大,于是遍历了一遍夏任务,找到了一条最省力的路线. 做完 Lab 6 的连线不用拆,可以接下来做以下两个实验: Lab 203 网络时钟 核心代码如下: v ...

  3. 6.824 Lab 5: Caching Extents

    Introduction In this lab you will modify YFS to cache extents, reducing the load on the extent serve ...

  4. 常用增强学习实验环境 I (MuJoCo, OpenAI Gym, rllab, DeepMind Lab, TORCS, PySC2) (转载)

    原文地址:http://blog.csdn.net/jinzhuojun/article/details/77144590 和其它的机器学习方向一样,强化学习(Reinforcement Learni ...

  5. Cloud Lab: 泰晓实验云台【转】

    转自:http://tinylab.org/cloud-lab/ 可快速构建的计算机课程在线实验平台 由 Wu Zhangjin 创建于 2017/10/06 评论 打赏 项目描述 泰晓实验云台 项目 ...

  6. Ubuntu下常用强化学习实验环境搭建(MuJoCo, OpenAI Gym, rllab, DeepMind Lab, TORCS, PySC2)

    http://lib.csdn.net/article/aimachinelearning/68113 原文地址:http://blog.csdn.net/jinzhuojun/article/det ...

  7. hapi lab测试框架简单使用

    1. 依赖安装 yarn init yarn add lab code 2. 基本模式 const Lab = require('lab'); const Code = require('code') ...

  8. Jupyer Notebook, Jupyter Lab 虚拟环境配置

    虚拟环境 conda create -n python36 python=3.6 使用以下命令激活: activate python36 Notebook 安装插件 conda install nb_ ...

  9. GitHub Learning Lab

    GitHub Learning Lab https://lab.github.com/ https://github.community/t5/GitHub-Learning-Lab/bd-p/lea ...

随机推荐

  1. Java应用程序监控JavaMelody

    JavaMelody是运行在Java Web容器中,用来监控Java内存和J服务器CPU使用情况,用户Session数量,JDBC连接数,和http请求.sql请求等的执行数量,平均执行时间,错误百分 ...

  2. NHibernate Demo 和 效率测试

    本文关于NHibernate的Demo和效率测试,希望对大家有用. 1.先去官网下载Nhibernate 2.放入到项目中并建立Helper类 private static ISession _Ses ...

  3. [转]细说Redis监控和告警

    原文  https://zhuoroger.github.io/2016/08/20/redis-monitor-and-alarm/? 对于任何应用服务和组件,都需要一套完善可靠谱监控方案. 尤其r ...

  4. FastJson的使用

    FastJson FastJson:阿里巴巴的一个Json处理工具包,包括序列化和反序列化两部分. <dependency> <groupId>com.alibaba</ ...

  5. AMap公交线路查询

    <!doctype html> <html> <head> <meta charset="utf-8"> <meta http ...

  6. 燕十八MySQL优化学习笔记

    观察 show status; 里面的这三个参数;Queries Threads_connected Threads_running判断周期性变化 -------------------------- ...

  7. [C#对sql操作]C#对sql server 2008数据库操作

    using System.Data; using System.Data.SqlClient SqlConnection conn = new SqlConnection(System.Configu ...

  8. 《所用到的AJAX技术基础》

    来自百度网页,w3cshool网页:AJAX = Asychronous JavaScript and XML,翻译成中文为:异步的JavaScript XML. 异步的意思就是不重新加载整个页面,后 ...

  9. [DFNews] Blackbag发布MacQuisition 2013 R2

    New in MacQuisition 2013 R2: Improved FileVault 2 Detection - Automatically detect the presence of a ...

  10. Unity3d之json解析研究

    Unity3d之json解析研究     json是好东西啊!JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式      JSON简单易用,我要好好研究一下 ...