Arduino
qq_45876412
这个作者很懒,什么都没留下…
展开
-
蜂鸣器测试代码
5呃6恶原创 2020-12-25 16:33:19 · 373 阅读 · 0 评论 -
Control DC motor
int IN3 = 3;int IN4 = 4;int ENB = 5;void setup() { Serial.begin(9600); pinMode(IN3,OUTPUT); pinMode(IN4,OUTPUT);}void text() { digitalWrite(IN3,HIGH); digitalWrite(IN4,L原创 2020-12-03 21:18:34 · 132 阅读 · 0 评论 -
LED Pattern
int LED1 = 9;int LED2 = 10;int LED3 = 11;void setup() { pinMode(LED1,OUTPUT); pinMode(LED2,OUTPUT); pinMode(LED3,OUTPUT);}void ledLight(int Led1, int Led2, int Led3) { if(Led1 == 1) { digitalWrite(Led1,HIGH); delay(500); }else{原创 2020-12-03 21:16:44 · 255 阅读 · 0 评论 -
Arduino学习之数码管倒计时(单个)
在这里插入代码片int a = 7;int b = 6;int c = 5;int d = 10;int e = 11;int f = 8;int g = 9;int p = 4;void setup() { for (int i=4; i<=11; i++) { pinMode (i,OUTPUT); } }int numTable[18][8] = { //a b c d e f g p { 1,1,1,1,1,1,0,0 }, { 0,1,1原创 2020-12-02 19:23:01 · 3522 阅读 · 0 评论 -
Arduino学习之万年历
#include <Wire.h>#include <DS1302.h>#include <Adafruit_GFX.h>#include <Adafruit_SSD1306.h>#include <Adafruit_SPIDevice.h>#define OLED_MOSI 11#define OLED_CLK 13#define OLED_DC 9#define OLED_CS 10#define OLE原创 2020-12-01 20:43:00 · 1607 阅读 · 1 评论