▒█▀▀█ █▀▀ █░░█ ▒█▀▀█ █░░█ ░▀░ █▀▀█
▒█▄▄█ ▀▀█ █▄▄█ ▒█░░░ █▀▀█ ▀█▀ █░░█
▒█░░░ ▀▀▀ ▄▄▄█ ▒█▄▄█ ▀░░▀ ▀▀▀ █▀▀▀
A serial command processor in arduino/* Serial Relay Controller Armagan Corlu aka PsyChip root@psychip.net April 2015 */ const byte NUMBER_OF_PINS = 4; // set number of relays byte relayPin[NUMBER_OF_PINS] = {7,6,5,4}; // define pin numbers of relays connected to String clist[]={"SET","ON","OFF","ALLON","ALLOFF"}; /* command format: command=param; SET=x; allows direct manipulation PORTD of arduino board ON=x; toggle relay on (x: relay number 1 to 4) OFF=x; toggle relay off ALLON; turn all relays on ALLOFF; turn all relays off */ String buffer; String command; String param; int recv; int fstep; void setup(void) { recv=0; buffer = ""; delay(250); while(!Serial); Serial.begin(19200); Serial.println("Initializing.."); } void loop(void) { // parse commands start recv=0; if (Serial.available() > 0) { recv=1; char incomingByte = (char)Serial.read(); if (incomingByte == ';') { fstep=0; for(int i=0;i
libraspi.js
2 Year, 11 Month ago
wifi_sensor_station.ino
serialrelay.ino
sensorstation.ino
class.dbipc.php