Closed Kaladin-Syl-WR closed 3 years ago
@Kaladin-Syl-WR Thanks for the question. Using Firmata with the STM boards has been a major problem and prompted me to abandon Firmata and to create another library, similar to Firmata, but simpler to use. The name of the library is Telemetrix. Like Firmata, you need to load a sketch onto the STM. The name of the sketch is Telemetrix4Arduino. It works for the STM as well as Arduino boards.
I have used this with a Black Pill board. This board does not include a serial loader, so I used an ST-Link to program it. I believe the Nucleo you are using includes an ST-Link and that should work as well.
I am not sure if this article is accurate, since I don't own a Nucleo, but here are some instructions on using the Arduino IDE to program the Nucleo.
The Python API is similar to Python4, but a somewhat simpler.
Hopefully this helps, but if you have any questions, please feel free to ask. I am closing this issue, but if you post a reply I will still see it. If you are having issues with Telemetrix or Telemetrix4Arduino (the sketch), please post the issue at this link.
Thank you very much for the clear and concise answer. I will definitely try that out and see if it solves my problem.
Hello everyone. This is my first question on a public forum so please excuse any errors pertaining to the issue format, or if to little information is given.
I am currently doing a project for vacation work where I have to use Firmata on different STM32 Microcontrollers. I am using the Arduino IDE to program the STM32L476RG Nucleo with StandardFirmata. I use Pymata4 to communicate/interface with the MCU. So far everything works as expected when I use the MCU's normal USB connector for communicating with the MCU. For my task, next task I cannot use the USB connector to communicate with the MCU. So what I am currently trying to do is communicate with the MCU through the USART1 RX an TX pins using the FT232R USB to serial UART interface.
When trying to establish a connection with the MCU through the USB to serial interface. The python code gives the following error:
I am just using the following code blinky example to test the connection:
I was able to confirm that the Arduino Uno successfully communicated with the MCU through the USB to serial interface with digital pins 0 and 1 as RX and TX respectively.
I have also confirmed that the STM32 MCU's USART1 does work over the USB to serial. I ran the Arduino MultiSerial example on the STM32 and was able read and write data through the USART1 pins/USB to serial interface.
So the problem seems to be between Pymata4 and the STM32's USART1, as it does work with the Arduino.
I also did change the StandardFirmata serial instantiation to the correct serial interface for the STM32:
Hope that is enough information for you to help me. Thanks in advance.