基于ESP32的RGY灯WiFi控制(Blinker)

1.硬件:

ESP32

RYG灯

手机

2.软件:

Arduino下的ESP32开发板

Blinker点灯APP

3.电路连接:

Arduino(RYG):GND(GND)       R(12)    Y(13)     G(14)

4.代码:

/* *****************************************************************
 *
 * Download latest Blinker library here:
 * https://github.com/blinker-iot/blinker-library/archive/master.zip
 * 
 * 
 * Blinker is a cross-hardware, cross-platform solution for the IoT. 
 * It provides APP, device and server support, 
 * and uses public cloud services for data transmission and storage.
 * It can be used in smart home, data monitoring and other fields 
 * to help users build Internet of Things projects better and faster.
 * 
 * Make sure installed 2.5.0 or later ESP8266/Arduino package,
 * if use
  • 8
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
`timescale 1ns / 1ps module control_tb;     // Inputs     reg clk;     reg rst_n;      reg [4:0] light_time;     // Outputs      reg [2:0]  RGY_led_1 ;//位选      reg [2:0]  RGY_led_2 ; //段选     // Instantiate the Unit Under Test (UUT)     control z4 (         .clk(clk),         .rst_n(rst_n),         .light_time(light_time),         .RGY_led_1(RGY_led_1),         .RGY_led_2(RGY_led_2)     );    parameter CYCLE    = 10;    parameter RST_TIME = 20 ;         initial begin                 clk = 0;                 forever                 #(CYCLE/2)                  clk=~clk;             end             initial begin                 rst_n = 0;                 #2;                 rst_n= 1;                 #(CYCLE*RST_TIME);                 rst_n = 0;             end       initial begin         light_time=5'b00000;         RGY_led_1=3'b000;         RGY_led_2=3'b000;         #200           light_time=5'b00001;         RGY_led_1=3'b001;         RGY_led_2=3'b001;         #200           light_time=5'b00010;         RGY_led_1=3'b010;         RGY_led_2=3'b010;         #200           light_time=5'b00100;         RGY_led_1=3'b100;         RGY_led_2=3'b100;         #200           light_time=5'b01000;         RGY_led_1=3'b001;         RGY_led_2=3'b001;         #200           light_time=5'b10000;         RGY_led_1=3'b010;         RGY_led_2=3'b010;     end endmodule
06-09

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

王宇飞 0427

感谢你的打赏,我会继续努力的。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值