From 190bfc15caca23214a76164766171706fc20535a Mon Sep 17 00:00:00 2001 From: grouille Date: Wed, 22 Jan 2020 16:51:14 +0100 Subject: [PATCH] MAJ --- rpiToArduino.py | 2 +- test.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 test.c diff --git a/rpiToArduino.py b/rpiToArduino.py index b111b57..22c282c 100755 --- a/rpiToArduino.py +++ b/rpiToArduino.py @@ -1,6 +1,6 @@ #!/usr/bin/env python import serial -ser = serial.Serial('/dev/ttyACM0', 9600) +ser = serial.Serial('/dev/ttyACM0', 9600, timeout=1) while 1: print(ser.readline()) diff --git a/test.c b/test.c new file mode 100644 index 0000000..55547b7 --- /dev/null +++ b/test.c @@ -0,0 +1,32 @@ +#include +#include +#include +#include + +//#define rxPin 0 +//#define txPin 1 + +//SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin); + +void setup() +{ + //DDRD = 0x02; + Serial.begin(9600); +} + +void loop() +{ + //if(mySerial.available() > 0) + //{ + Serial.println('A'); + //} +} + +int main(void) +{ + while(1) + { + loop(); + _delay_ms(2000); + } +} -- libgit2 0.21.2