summaryrefslogtreecommitdiff
path: root/CODE/debugprewk/debug/comm/arduino_comm
diff options
context:
space:
mode:
authorAbel Tim <abel.tim.t@gmail.com>2025-03-23 12:38:48 +0100
committerAbel Tim <abel.tim.t@gmail.com>2025-03-23 12:38:48 +0100
commit764c8722596f5b3bd01bb26848f7289b0972d7b0 (patch)
tree73b8090d371b0c0479f1b72803f3e0e0f0754dc1 /CODE/debugprewk/debug/comm/arduino_comm
parenta52c13fdf50fbc19dfdce2d087b4739b96d46a0b (diff)
downloadrobotica-764c8722596f5b3bd01bb26848f7289b0972d7b0.tar.gz
robotica-764c8722596f5b3bd01bb26848f7289b0972d7b0.zip
updated repo structure
Diffstat (limited to 'CODE/debugprewk/debug/comm/arduino_comm')
-rw-r--r--CODE/debugprewk/debug/comm/arduino_comm/arduino_comm.ino37
1 files changed, 0 insertions, 37 deletions
diff --git a/CODE/debugprewk/debug/comm/arduino_comm/arduino_comm.ino b/CODE/debugprewk/debug/comm/arduino_comm/arduino_comm.ino
deleted file mode 100644
index 4a2b205..0000000
--- a/CODE/debugprewk/debug/comm/arduino_comm/arduino_comm.ino
+++ /dev/null
@@ -1,37 +0,0 @@
-String tlocd = "";
-String locd = "";
-bool readloc = false;
-unsigned long datatime = 0;
-
-void setup() {
- Serial1.begin(19200);
- Serial.begin(19200);
-}
-
-void loop() {
- if(Serial1.available()){
- datatime = millis();
-
- byte byteRead = Serial1.read();
-
- if(byteRead == 's'){
- tlocd = "";
- readloc = true;
- }
- else if(byteRead == 'e'){
- readloc = false;
- locd = tlocd;
- }
- else if(readloc == true){
- tlocd += (char)byteRead;
- }
- }
- else{
- if(millis() - datatime > 5000){
- Serial.println("Err no data recieved for 5 sec");
- locd = "999";
- }
- }
- Serial.println(locd);
- delay(134);
-}