This commit is contained in:
FluffyCube9343 2022-08-10 09:06:44 -04:00
commit 20fb91d9e7
2 changed files with 8 additions and 7 deletions

View File

@ -11,6 +11,7 @@ String incomingBytes2 = "";
int readPls = 0; int readPls = 0;
void setup() { void setup() {
Serial3.begin(115200);Serial2.begin(115200);Serial.begin(115200); // opens serial port, sets data rate to 9600 bps Serial3.begin(115200);Serial2.begin(115200);Serial.begin(115200); // opens serial port, sets data rate to 9600 bps
delay(8000); //8 second delay to wait for RPi to run, avoids port busy error on RPi.
} }
void loop() { void loop() {

View File

@ -2,7 +2,7 @@
Code for **wired** communication from Slave Arduinos to Master Arduino, and then Master Arduino to Raspberry Pi.<br/> Code for **wired** communication from Slave Arduinos to Master Arduino, and then Master Arduino to Raspberry Pi.<br/>
###Code Description ### Code Description
- `RPi/` is working code for the Raspberry Pi - `RPi/` is working code for the Raspberry Pi
- `RPICOM.py` is the main python file that should be run on the Raspberry Pi. - `RPICOM.py` is the main python file that should be run on the Raspberry Pi.
@ -16,7 +16,7 @@ Code for **wired** communication from Slave Arduinos to Master Arduino, and then
- `Prev/` is previous code used for testing systems and debugging errors (not final code, and may be unstable)<br/> - `Prev/` is previous code used for testing systems and debugging errors (not final code, and may be unstable)<br/>
###Setup and Run ### Setup and Run
**Make sure you install python beforehand** **Make sure you install python beforehand**
@ -44,25 +44,25 @@ chmod 777 /dev/ttyACM*
5. Open Arduino IDE and upload `blank/blank.ino` to all Arduinos. 5. Open Arduino IDE and upload `blank/blank.ino` to all Arduinos.
**Do not open serial monitor until steps 6-8 are done** **Do not open serial monitor on any Arduino**
6. Upload `SlaveCode/SlaveCode.ino` or `SlaveFakeCode/SlaveFakeCode.ino` to the Slave Arduinos in Arduino IDE 6. Upload `SlaveCode/SlaveCode.ino` or `SlaveFakeCode/SlaveFakeCode.ino` to the Slave Arduinos in Arduino IDE
7. Upload `MasterCode/MasterCode.ino` to the Master Arduino in Arduino IDE 7. `Cd` into `RPi/`
8. `Cd` into `RPi/`
``` ```
cd RPi/ cd RPi/
``` ```
9. Install pyserial 8. Install pyserial
``` ```
pip3 install pyserial pip3 install pyserial
``` ```
9. Upload `MasterCode/MasterCode.ino` to the Master Arduino in Arduino IDE
10. Run the python code. 10. Run the python code.
``` ```