Index

auto-plow / 90c3edc

A wheelchair motor-propelled battery-powered ESP32-driven remote control snow plow.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
2502 Dec 2018 03:5090c3edcUpdate ard1.cppjoshuas31113N

Blob @ auto-plow / src / ard1 / ard1.cpp

text/plain616 bytesdownload raw
1#include "Arduino.h"
2
3// One time
4void setup() {
5 pinMode(13, OUTPUT);
6 digitalWrite(13, HIGH);
7 Serial.begin(9600);
8 while (!Serial)
9 ;
10 Serial.println("ARD1: Motor Controller Active");
11 Serial.println("ARD1: Hello, World!");
12}
13
14void (* resetFunc) (void) = 0;
15
16
17// Repeatedly
18void loop() {
19 if (Serial.available() > 0) {
20 Serial.print("ARD1: Received information: ");
21 String message = Serial.readStringUntil(';');
22 Serial.println(message);
23 Serial.flush();
24 if (message == String("Restart")) {
25 Serial.println("ARD1: Restarting");
26 Serial.flush();
27 resetFunc();
28 }
29 }
30}
31