I'd like to run a python script when Arduino IDE detects a certain keyword in Serial.read()
The script won't interact with the arduino board, I just need the ide to run it or equivalent to the cmd "python filename.py". Is this possible? I'm using an Arduino UNO if that matters
I don't understand what are you trying to do?
You try to run python script on PC, right? But Serial.read() is a part of arduino code, running inside the board. How are both will be interact each other?
The Arduino IDE does not "run" code on the Arduino.
The IDE does have an optional serial monitor, which displays data that comes in through the serial port, which is produced by serial output from a running Arduino.
If you want the PC to react to information coming in from the serial port, write a PC program that monitors the serial traffic, looking for keywords or information, and takes appropriate action.
You might want to get a board that can run micro python
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.