Marshmallows Cannon
The project aims to make a device that integrates the family around a gastronomic and technological game.
Components and supplies
1
Echo Dot
1
RobotGeek Relay
1
ESP8266 ESP-01
Tools and machines
1
compressor
1
electrovalve
Apps and platforms
1
linux mint
Project description
Code
Marshmallow cannon
arduino
integration for arduino and alexa
1#include <ESP8266WiFi.h> 2#include <ESP8266WebServer.h> 3#include <WiFiUdp.h> 4#include <functional> 5 6void prepareIds(); 7boolean connectWifi(); 8boolean connectUDP(); 9void startHttpServer(); 10void turnOnRelay(); 11void turnOffRelay(); 12/*********************************/ 13/*********************************/ 14/*********************************/ 15 // You only need to modify folloing settings to get it to work woth Alexa and your network 16const char* ssid = "Wilman-Romero"; 17const char* password = "********"; 18String device_name= "momo";// you can chage the device name from "DemoSwitch" to anything 19 // local port to listen on 20/*********************************/ 21//Change the GPIO - for on board LED const int relayPin = LED_BUILTIN; //GPIO1\uFEFF 22const int relayPin = D2; 23const int relayPin2 = D0; 24/*********************************/ 25/*********************************/ 26 27 28unsigned int localPort = 1900; // local port to listen on 29 30WiFiUDP UDP; 31boolean udpConnected = false; 32IPAddress ipMulti(239, 255, 255, 250); 33unsigned int portMulti = 1900; // local port to listen on 34 35ESP8266WebServer HTTP(80); 36 37boolean wifiConnected = false; 38 39char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet, 40 41String serial; 42String persistent_uuid; 43String switch1; 44 45 46 47boolean cannotConnectToWifi = false; 48 49void setup() { 50 Serial.begin(115200); 51 52 // Setup Relay 53 pinMode(relayPin, OUTPUT); 54 pinMode(relayPin2, OUTPUT); 55 56 prepareIds(); 57 58 // Initialise wifi connection 59 wifiConnected = connectWifi(); 60 61 // only proceed if wifi connection successful 62 if(wifiConnected){ 63 udpConnected = connectUDP(); 64 Serial.println("IP address: "); 65 Serial.println(WiFi.localIP()); 66 if (udpConnected){ 67 // initialise pins if needed 68 startHttpServer(); 69 } 70 } 71 digitalWrite(relayPin, LOW); 72} 73 74void loop() { 75 76 HTTP.handleClient(); 77 delay(1); 78 79 80 // if there's data available, read a packet 81 // check if the WiFi and UDP connections were successful 82 if(wifiConnected){ 83 if(udpConnected){ 84 // if there’s data available, read a packet 85 int packetSize = UDP.parsePacket(); 86 87 if(packetSize) { 88 Serial.println(""); 89 Serial.print("Received packet of size "); 90 Serial.println(packetSize); 91 Serial.print("From "); 92 IPAddress remote = UDP.remoteIP(); 93 94 for (int i =0; i < 4; i++) { 95 Serial.print(remote[i], DEC); 96 if (i < 3) { 97 Serial.print("."); 98 } 99 } 100 101 Serial.print(", port "); 102 Serial.println(UDP.remotePort()); 103 104 int len = UDP.read(packetBuffer, 255); 105 106 if (len > 0) { 107 packetBuffer[len] = 0; 108 } 109 110 String request = packetBuffer; 111 Serial.println("Request:"); 112 Serial.println(request); 113 114 if(request.indexOf('M-SEARCH') > 0) { 115 if(request.indexOf("urn:Belkin:device:**") > 0) { 116 Serial.println("Responding to search request ..."); 117 respondToSearch(); 118 } 119 } 120 } 121 122 delay(10); 123 } 124 } else { 125 // Turn on/off to indicate cannot connect .. 126 } 127} 128 129void prepareIds() { 130 uint32_t chipId = ESP.getChipId(); 131 Serial.println("ChipId"); 132 Serial.println(chipId); 133 char uuid[64]; 134 sprintf_P(uuid, PSTR("38323636-4558-4dda-9188-cda0e6%02x%02x%02x"), 135 (uint16_t) ((chipId >> 16) & 0xff), 136 (uint16_t) ((chipId >> 8) & 0xff), 137 (uint16_t) chipId & 0xff); 138 139 serial = String(uuid); 140 persistent_uuid = "Socket-1_0-" + serial; 141 //device_name = "box"; 142} 143 144void respondToSearch() { 145 Serial.println(""); 146 Serial.print("Sending response to "); 147 Serial.println(UDP.remoteIP()); 148 Serial.print("Port : "); 149 Serial.println(UDP.remotePort()); 150 151 IPAddress localIP = WiFi.localIP(); 152 char s[16]; 153 sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]); 154 155 String response = 156 "HTTP/1.1 200 OK\ \ 157" 158 "CACHE-CONTROL: max-age=86400\ \ 159" 160 "DATE: Fri, 15 Apr 2016 04:56:29 GMT\ \ 161" 162 "EXT:\ \ 163" 164 "LOCATION: http://" + String(s) + ":80/setup.xml\ \ 165" 166 "OPT: \\"http://schemas.upnp.org/upnp/1/0/\\"; ns=01\ \ 167" 168 "01-NLS: b9200ebb-736d-4b93-bf03-835149d13983\ \ 169" 170 "SERVER: Unspecified, UPnP/1.0, Unspecified\ \ 171" 172 "ST: urn:Belkin:device:**\ \ 173" 174 "USN: uuid:" + persistent_uuid + "::urn:Belkin:device:**\ \ 175" 176 "X-User-Agent: redsonic\ \ 177\ \ 178"; 179 180 UDP.beginPacket(UDP.remoteIP(), UDP.remotePort()); 181 UDP.write(response.c_str()); 182 UDP.endPacket(); 183 184 Serial.println("Response sent !"); 185} 186 187void startHttpServer() { 188 HTTP.on("/index.html", HTTP_GET, [](){ 189 Serial.println("Got Request index.html ...\ 190"); 191 HTTP.send(200, "text/plain", "Hellow"); 192 }); 193 194 195 196 HTTP.on("/upnp/control/basicevent1", HTTP_POST, []() { 197 Serial.println("########## Responding to /upnp/control/basicevent1 ... ##########"); 198 199 /*for (int x=0; x <= HTTP.args(); x++) { 200 Serial.println(HTTP.arg(x)); 201 }*/ 202 203 String request = HTTP.arg(0); 204 //Serial.print("request:"); 205 //Serial.println(request); 206 207 if(request.indexOf("<BinaryState>1</BinaryState>") > 0) { 208 Serial.println("Got Turn on request"); 209 //turnOnRelay(); 210 digitalWrite(relayPin, HIGH); 211 delay(50); 212 digitalWrite(relayPin, LOW); //aca es donde toca modificar///////////////////////////////////////////////////////////// 213 214 215 216 } 217 218 if(request.indexOf("<BinaryState>0</BinaryState>") > 0) { 219 Serial.println("Got Turn off request"); 220 //turnOffRelay(); 221 digitalWrite(relayPin, HIGH); 222 } 223 224 HTTP.send(200, "text/plain", ""); 225 }); 226 227 228 HTTP.on("/switch", HTTP_GET, []() { 229 Serial.println("########## Responding to switch on/off get request ... ##########"); 230 231 /*for (int x=0; x <= HTTP.args(); x++) { 232 Serial.println(HTTP.arg(x)); 233 }*/ 234 235 int request = HTTP.arg(0).toInt(); 236 237 if(request == 1) { 238 Serial.println("Got switch Turn on request"); 239 digitalWrite(relayPin, HIGH); 240 switch1 = "On"; 241 } 242 243 if(request == 0) { 244 Serial.println("Got switch Turn off request"); 245 digitalWrite(relayPin, LOW); 246 switch1 = "Off"; 247 } 248 249 HTTP.send(200, "text/plain", "Switch is " + switch1); 250 }); 251 252 253 254 HTTP.on("/eventservice.xml", HTTP_GET, [](){ 255 Serial.println(" ########## Responding to eventservice.xml ... ########\ 256"); 257 String eventservice_xml = "<?scpd xmlns=\\"urn:Belkin:service-1-0\\"?>" 258 "<actionList>" 259 "<action>" 260 "<name>SetBinaryState</name>" 261 "<argumentList>" 262 "<argument>" 263 "<retval/>" 264 "<name>BinaryState</name>" 265 "<relatedStateVariable>BinaryState</relatedStateVariable>" 266 "<direction>in</direction>" 267 "</argument>" 268 "</argumentList>" 269 "<serviceStateTable>" 270 "<stateVariable sendEvents=\\"yes\\">" 271 "<name>BinaryState</name>" 272 "<dataType>Boolean</dataType>" 273 "<defaultValue>0</defaultValue>" 274 "</stateVariable>" 275 "<stateVariable sendEvents=\\"yes\\">" 276 "<name>level</name>" 277 "<dataType>string</dataType>" 278 "<defaultValue>0</defaultValue>" 279 "</stateVariable>" 280 "</serviceStateTable>" 281 "</action>" 282 "</scpd>\ \ 283" 284 "\ \ 285"; 286 287 HTTP.send(200, "text/plain", eventservice_xml.c_str()); 288 }); 289 290 HTTP.on("/setup.xml", HTTP_GET, [](){ 291 Serial.println(" ########## Responding to setup.xml ... ########\ 292"); 293 294 IPAddress localIP = WiFi.localIP(); 295 char s[16]; 296 sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]); 297 298 String setup_xml = "<?xml version=\\"1.0\\"?>" 299 "<root>" 300 "<device>" 301 "<deviceType>urn:Belkin:device:controllee:1</deviceType>" 302 "<friendlyName>"+ device_name +"</friendlyName>" 303 "<manufacturer>Belkin International Inc.</manufacturer>" 304 "<modelName>Emulated Socket</modelName>" 305 "<modelNumber>3.1415</modelNumber>" 306 "<UDN>uuid:"+ persistent_uuid +"</UDN>" 307 "<serialNumber>221517K0101769</serialNumber>" 308 "<binaryState>0</binaryState>" 309 "<serviceList>" 310 "<service>" 311 "<serviceType>urn:Belkin:service:basicevent:1</serviceType>" 312 "<serviceId>urn:Belkin:serviceId:basicevent1</serviceId>" 313 "<controlURL>/upnp/control/basicevent1</controlURL>" 314 "<eventSubURL>/upnp/event/basicevent1</eventSubURL>" 315 "<SCPDURL>/eventservice.xml</SCPDURL>" 316 "</service>" 317 "</serviceList>" 318 "</device>" 319 "</root>\ \ 320" 321 "\ \ 322"; 323 324 HTTP.send(200, "text/xml", setup_xml.c_str()); 325 326 Serial.print("Sending :"); 327 Serial.println(setup_xml); 328 }); 329 330 HTTP.begin(); 331 Serial.println("HTTP Server started .."); 332} 333 334 335 336// connect to wifi – returns true if successful or false if not 337boolean connectWifi(){ 338 boolean state = true; 339 int i = 0; 340 341 WiFi.mode(WIFI_STA); 342 WiFi.begin(ssid, password); 343 Serial.println(""); 344 Serial.println("Connecting to WiFi"); 345 346 // Wait for connection 347 Serial.print("Connecting ..."); 348 while (WiFi.status() != WL_CONNECTED) { 349 delay(500); 350 Serial.print("."); 351 if (i > 10){ 352 state = false; 353 break; 354 } 355 i++; 356 } 357 358 if (state){ 359 Serial.println(""); 360 Serial.print("Connected to "); 361 Serial.println(ssid); 362 Serial.print("IP address: "); 363 Serial.println(WiFi.localIP()); 364 } 365 else { 366 Serial.println(""); 367 Serial.println("Connection failed."); 368 } 369 370 return state; 371} 372 373boolean connectUDP(){ 374 boolean state = false; 375 376 Serial.println(""); 377 Serial.println("Connecting to UDP"); 378 379 if(UDP.beginMulticast(WiFi.localIP(), ipMulti, portMulti)) { 380 Serial.println("Connection successful"); 381 state = true; 382 } 383 else{ 384 Serial.println("Connection failed"); 385 } 386 387 return state; 388} 389 390void turnOnRelay() { 391 digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH 392 393} 394 395void turnOffRelay() { 396 digitalWrite(relayPin,HIGH ); // turn off relay with voltage LOW 397 398} 399 400
Marshmallow cannon
arduino
integration for arduino and alexa
1#include <ESP8266WiFi.h> 2#include <ESP8266WebServer.h> 3#include <WiFiUdp.h> 4#include <functional> 5 6void prepareIds(); 7boolean connectWifi(); 8boolean connectUDP(); 9void startHttpServer(); 10void turnOnRelay(); 11void turnOffRelay(); 12/*********************************/ 13/*********************************/ 14/*********************************/ 15 // You only need to modify folloing settings to get it to work woth Alexa and your network 16const char* ssid = "Wilman-Romero"; 17const char* password = "********"; 18String device_name= "momo";// you can chage the device name from "DemoSwitch" to anything 19 // local port to listen on 20/*********************************/ 21//Change the GPIO - for on board LED const int relayPin = LED_BUILTIN; //GPIO1\uFEFF 22const int relayPin = D2; 23const int relayPin2 = D0; 24/*********************************/ 25/*********************************/ 26 27 28unsigned int localPort = 1900; // local port to listen on 29 30WiFiUDP UDP; 31boolean udpConnected = false; 32IPAddress ipMulti(239, 255, 255, 250); 33unsigned int portMulti = 1900; // local port to listen on 34 35ESP8266WebServer HTTP(80); 36 37boolean wifiConnected = false; 38 39char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet, 40 41String serial; 42String persistent_uuid; 43String switch1; 44 45 46 47boolean cannotConnectToWifi = false; 48 49void setup() { 50 Serial.begin(115200); 51 52 // Setup Relay 53 pinMode(relayPin, OUTPUT); 54 pinMode(relayPin2, OUTPUT); 55 56 prepareIds(); 57 58 // Initialise wifi connection 59 wifiConnected = connectWifi(); 60 61 // only proceed if wifi connection successful 62 if(wifiConnected){ 63 udpConnected = connectUDP(); 64 Serial.println("IP address: "); 65 Serial.println(WiFi.localIP()); 66 if (udpConnected){ 67 // initialise pins if needed 68 startHttpServer(); 69 } 70 } 71 digitalWrite(relayPin, LOW); 72} 73 74void loop() { 75 76 HTTP.handleClient(); 77 delay(1); 78 79 80 // if there's data available, read a packet 81 // check if the WiFi and UDP connections were successful 82 if(wifiConnected){ 83 if(udpConnected){ 84 // if there’s data available, read a packet 85 int packetSize = UDP.parsePacket(); 86 87 if(packetSize) { 88 Serial.println(""); 89 Serial.print("Received packet of size "); 90 Serial.println(packetSize); 91 Serial.print("From "); 92 IPAddress remote = UDP.remoteIP(); 93 94 for (int i =0; i < 4; i++) { 95 Serial.print(remote[i], DEC); 96 if (i < 3) { 97 Serial.print("."); 98 } 99 } 100 101 Serial.print(", port "); 102 Serial.println(UDP.remotePort()); 103 104 int len = UDP.read(packetBuffer, 255); 105 106 if (len > 0) { 107 packetBuffer[len] = 0; 108 } 109 110 String request = packetBuffer; 111 Serial.println("Request:"); 112 Serial.println(request); 113 114 if(request.indexOf('M-SEARCH') > 0) { 115 if(request.indexOf("urn:Belkin:device:**") > 0) { 116 Serial.println("Responding to search request ..."); 117 respondToSearch(); 118 } 119 } 120 } 121 122 delay(10); 123 } 124 } else { 125 // Turn on/off to indicate cannot connect .. 126 } 127} 128 129void prepareIds() { 130 uint32_t chipId = ESP.getChipId(); 131 Serial.println("ChipId"); 132 Serial.println(chipId); 133 char uuid[64]; 134 sprintf_P(uuid, PSTR("38323636-4558-4dda-9188-cda0e6%02x%02x%02x"), 135 (uint16_t) ((chipId >> 16) & 0xff), 136 (uint16_t) ((chipId >> 8) & 0xff), 137 (uint16_t) chipId & 0xff); 138 139 serial = String(uuid); 140 persistent_uuid = "Socket-1_0-" + serial; 141 //device_name = "box"; 142} 143 144void respondToSearch() { 145 Serial.println(""); 146 Serial.print("Sending response to "); 147 Serial.println(UDP.remoteIP()); 148 Serial.print("Port : "); 149 Serial.println(UDP.remotePort()); 150 151 IPAddress localIP = WiFi.localIP(); 152 char s[16]; 153 sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]); 154 155 String response = 156 "HTTP/1.1 200 OK\ \ 157" 158 "CACHE-CONTROL: max-age=86400\ \ 159" 160 "DATE: Fri, 15 Apr 2016 04:56:29 GMT\ \ 161" 162 "EXT:\ \ 163" 164 "LOCATION: http://" + String(s) + ":80/setup.xml\ \ 165" 166 "OPT: \\"http://schemas.upnp.org/upnp/1/0/\\"; ns=01\ \ 167" 168 "01-NLS: b9200ebb-736d-4b93-bf03-835149d13983\ \ 169" 170 "SERVER: Unspecified, UPnP/1.0, Unspecified\ \ 171" 172 "ST: urn:Belkin:device:**\ \ 173" 174 "USN: uuid:" + persistent_uuid + "::urn:Belkin:device:**\ \ 175" 176 "X-User-Agent: redsonic\ \ 177\ \ 178"; 179 180 UDP.beginPacket(UDP.remoteIP(), UDP.remotePort()); 181 UDP.write(response.c_str()); 182 UDP.endPacket(); 183 184 Serial.println("Response sent !"); 185} 186 187void startHttpServer() { 188 HTTP.on("/index.html", HTTP_GET, [](){ 189 Serial.println("Got Request index.html ...\ 190"); 191 HTTP.send(200, "text/plain", "Hellow"); 192 }); 193 194 195 196 HTTP.on("/upnp/control/basicevent1", HTTP_POST, []() { 197 Serial.println("########## Responding to /upnp/control/basicevent1 ... ##########"); 198 199 /*for (int x=0; x <= HTTP.args(); x++) { 200 Serial.println(HTTP.arg(x)); 201 }*/ 202 203 String request = HTTP.arg(0); 204 //Serial.print("request:"); 205 //Serial.println(request); 206 207 if(request.indexOf("<BinaryState>1</BinaryState>") > 0) { 208 Serial.println("Got Turn on request"); 209 //turnOnRelay(); 210 digitalWrite(relayPin, HIGH); 211 delay(50); 212 digitalWrite(relayPin, LOW); //aca es donde toca modificar///////////////////////////////////////////////////////////// 213 214 215 216 } 217 218 if(request.indexOf("<BinaryState>0</BinaryState>") > 0) { 219 Serial.println("Got Turn off request"); 220 //turnOffRelay(); 221 digitalWrite(relayPin, HIGH); 222 } 223 224 HTTP.send(200, "text/plain", ""); 225 }); 226 227 228 HTTP.on("/switch", HTTP_GET, []() { 229 Serial.println("########## Responding to switch on/off get request ... ##########"); 230 231 /*for (int x=0; x <= HTTP.args(); x++) { 232 Serial.println(HTTP.arg(x)); 233 }*/ 234 235 int request = HTTP.arg(0).toInt(); 236 237 if(request == 1) { 238 Serial.println("Got switch Turn on request"); 239 digitalWrite(relayPin, HIGH); 240 switch1 = "On"; 241 } 242 243 if(request == 0) { 244 Serial.println("Got switch Turn off request"); 245 digitalWrite(relayPin, LOW); 246 switch1 = "Off"; 247 } 248 249 HTTP.send(200, "text/plain", "Switch is " + switch1); 250 }); 251 252 253 254 HTTP.on("/eventservice.xml", HTTP_GET, [](){ 255 Serial.println(" ########## Responding to eventservice.xml ... ########\ 256"); 257 String eventservice_xml = "<?scpd xmlns=\\"urn:Belkin:service-1-0\\"?>" 258 "<actionList>" 259 "<action>" 260 "<name>SetBinaryState</name>" 261 "<argumentList>" 262 "<argument>" 263 "<retval/>" 264 "<name>BinaryState</name>" 265 "<relatedStateVariable>BinaryState</relatedStateVariable>" 266 "<direction>in</direction>" 267 "</argument>" 268 "</argumentList>" 269 "<serviceStateTable>" 270 "<stateVariable sendEvents=\\"yes\\">" 271 "<name>BinaryState</name>" 272 "<dataType>Boolean</dataType>" 273 "<defaultValue>0</defaultValue>" 274 "</stateVariable>" 275 "<stateVariable sendEvents=\\"yes\\">" 276 "<name>level</name>" 277 "<dataType>string</dataType>" 278 "<defaultValue>0</defaultValue>" 279 "</stateVariable>" 280 "</serviceStateTable>" 281 "</action>" 282 "</scpd>\ \ 283" 284 "\ \ 285"; 286 287 HTTP.send(200, "text/plain", eventservice_xml.c_str()); 288 }); 289 290 HTTP.on("/setup.xml", HTTP_GET, [](){ 291 Serial.println(" ########## Responding to setup.xml ... ########\ 292"); 293 294 IPAddress localIP = WiFi.localIP(); 295 char s[16]; 296 sprintf(s, "%d.%d.%d.%d", localIP[0], localIP[1], localIP[2], localIP[3]); 297 298 String setup_xml = "<?xml version=\\"1.0\\"?>" 299 "<root>" 300 "<device>" 301 "<deviceType>urn:Belkin:device:controllee:1</deviceType>" 302 "<friendlyName>"+ device_name +"</friendlyName>" 303 "<manufacturer>Belkin International Inc.</manufacturer>" 304 "<modelName>Emulated Socket</modelName>" 305 "<modelNumber>3.1415</modelNumber>" 306 "<UDN>uuid:"+ persistent_uuid +"</UDN>" 307 "<serialNumber>221517K0101769</serialNumber>" 308 "<binaryState>0</binaryState>" 309 "<serviceList>" 310 "<service>" 311 "<serviceType>urn:Belkin:service:basicevent:1</serviceType>" 312 "<serviceId>urn:Belkin:serviceId:basicevent1</serviceId>" 313 "<controlURL>/upnp/control/basicevent1</controlURL>" 314 "<eventSubURL>/upnp/event/basicevent1</eventSubURL>" 315 "<SCPDURL>/eventservice.xml</SCPDURL>" 316 "</service>" 317 "</serviceList>" 318 "</device>" 319 "</root>\ \ 320" 321 "\ \ 322"; 323 324 HTTP.send(200, "text/xml", setup_xml.c_str()); 325 326 Serial.print("Sending :"); 327 Serial.println(setup_xml); 328 }); 329 330 HTTP.begin(); 331 Serial.println("HTTP Server started .."); 332} 333 334 335 336// connect to wifi – returns true if successful or false if not 337boolean connectWifi(){ 338 boolean state = true; 339 int i = 0; 340 341 WiFi.mode(WIFI_STA); 342 WiFi.begin(ssid, password); 343 Serial.println(""); 344 Serial.println("Connecting to WiFi"); 345 346 // Wait for connection 347 Serial.print("Connecting ..."); 348 while (WiFi.status() != WL_CONNECTED) { 349 delay(500); 350 Serial.print("."); 351 if (i > 10){ 352 state = false; 353 break; 354 } 355 i++; 356 } 357 358 if (state){ 359 Serial.println(""); 360 Serial.print("Connected to "); 361 Serial.println(ssid); 362 Serial.print("IP address: "); 363 Serial.println(WiFi.localIP()); 364 } 365 else { 366 Serial.println(""); 367 Serial.println("Connection failed."); 368 } 369 370 return state; 371} 372 373boolean connectUDP(){ 374 boolean state = false; 375 376 Serial.println(""); 377 Serial.println("Connecting to UDP"); 378 379 if(UDP.beginMulticast(WiFi.localIP(), ipMulti, portMulti)) { 380 Serial.println("Connection successful"); 381 state = true; 382 } 383 else{ 384 Serial.println("Connection failed"); 385 } 386 387 return state; 388} 389 390void turnOnRelay() { 391 digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH 392 393} 394 395void turnOffRelay() { 396 digitalWrite(relayPin,HIGH ); // turn off relay with voltage LOW 397 398} 399 400
Downloadable files
Components
atx source, electrovalve, relay module esp2286
Components

Comments
Only logged in users can leave comments