3- PlatformIO extension (for Arduino Development in C/C++)
4- Python3 and Python2 are both installed on my mac.
The Problem:
I was trying to embed a python application called “sr1.py” into my C/C++ application but I’m getting this error when hovering on the #inclde <python.h> squiggly red line:
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/Users/ImCodeName7/Documents/PlatformIO/Projects/speech_recognision/src/main.cpp).C/C++(1696) cannot open source file "python.h"C/C++(1696)
Are you trying to write software for an embedded system like an Arduino Uno?
If so, you would need a Python version specifically built for the Arduino Uno. But I doubt that it exists at all. I’ve never heard of such Python versions.
There are boards supporting MicroPython. But then you wouldn’t combine it with C++ code for the Arduino framework.
So generally I doubt very much that your approach is possible.
I am trying to compile a C/C++ arduino code where I need to integrate a python code which will allow me to use speech recognizing functions to control arduino, the python part will convert my speech into a text where I can use this text as a variable and compare it to conditionals to allow a certain operation executed be an arduino.
arduino nano, the app is going to run on my computer and will control the arduino pins by getting instructions from the voice recognition library which is made for python. my code is written in arduino C but I need this small python code embedded into my application.
The Python code with voice recognition runs on your computer, a C/C++ program runs on your Arduino Nano.
They can communicate with each other via a serial communication, either using a custom protocol you design yourself or a standard protocol like Firmata. The later setup is describe on this web page: