This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <SoftwareSerial.h> | |
#include <DHT.h> | |
byte stateLedPins[] = {4 ,5 ,6 ,7}; | |
const byte stateLedCount = 4; | |
int state = -1; | |
SoftwareSerial AT( 2, 3 ); // RX, TX | |
DHT DHT(A0, DHT22); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
const byte ledCount = 2; | |
byte ledPins[] = {5, 6}; | |
byte led1 = 0; | |
byte led2 = 0; | |
byte nowled = 0; | |
void light11() { | |
if (led1 == 0) { | |
for (int fadeValue = 0 ; fadeValue <= 100; fadeValue += 5) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 學校作業 | |
// 資工二B 鍾騰 | |
// | |
#include <SoftwareSerial.h> | |
const byte ledCount = 2; | |
char val; | |
byte ledPins[] = {5, 6}; | |
byte led1 = 0; | |
byte led2 = 0; |