Skip to content

Instantly share code, notes, and snippets.

// 學校作業
// 資工二B 鍾騰
//
#include <SoftwareSerial.h>
const byte ledCount = 2;
char val;
byte ledPins[] = {5, 6};
byte led1 = 0;
byte led2 = 0;
#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) {
#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);