LaboratoireMecaniqueLille / crappy

Command and Real-time Acquisition Parallelized in Python
https://crappy.readthedocs.io/en/stable/
GNU General Public License v2.0
78 stars 16 forks source link

ucontroller example broken #120

Closed jeffwitz closed 4 months ago

jeffwitz commented 4 months ago

Hi,

We try to use the example of ucontroller communication of crappy, but it appears that it doesn't work anymore.

Nothing is read by the crappy program , so nothing is displayed inside the dash.

WeisLeDocto commented 4 months ago

Please be more specific. As per the documentation of the ucontroller.py example:

Before starting this script, you first have to install MicroPython on your microcontroller and upload the microcontroller.py script as the main.py file.

Did you follow these steps ? Also:

It was written for and tested on Adafruit's Huzzah ESP32 board, but should work on other microcontrollers or boards with minor adjustments.

What microcontroller are you using ? Which version of MicroPython ? Finally:

The UController Block can drive a microcontroller with MicroPython installed (...) It can also drive a microcontroller running the Arduino microcontroller.ino script, that can be found in Crappy's tool.

This holds true for the UController Block in the general case, but not for the ucontroller.py example example specifically. This example was not tested using the Arduino code, there is therefore no guarantee that it works as is with the microcontroller.ino script.

WeisLeDocto commented 4 months ago

Just as a quick update, I tested the ucontroller.py example on a 2ac7z-esp32 microcontroller (Adafruit Huzzah32 Feather), along with the microcontroller.py script, and everything worked as expected.

Steps that I took:

WeisLeDocto commented 4 months ago

New update, I also tested the microcontroller.ino script on the same device as in my previous message, and obtained successful results.

I'm now closing this issue, as I can't reproduce the (very imprecisely) described bug, and as everything seems to be functional on Crappy's side. Keep in mind that the microcontroller.py and microcontroller.ino scripts may need to be adapted to each new chip + board combination, and might as well not work at all in some cases. As such adaptations are specific to each user, they fall outside the scope of the support I can offer.

Steps that I took: