Translate

Updates Available for pymata-aio, s2aio and FirmataPlus



Pymata-aio version 2.14 and s2aio version 2.9 are now available on Pypi.

To upgrade s2aio to the latest version, in a command window type:

pip install s2aio --upgrade

This should update both s2aio and pymata_aio.

To upgrade pymata-aio, in a command window type:

pip install pymata-aio --upgrade

FirmataPlus and its variants have been updated and are baselined against StandardFirmata 2.5.3.

These libraries now support both PyMata and pymata-aio. You can download the zip file here and installation instructions can be found here.


7 comments:

  1. Hello, when I try to set my analog pin 10 with set_pin_mode(10, Constants.ANALOG) I got an error "ValueError: bytes must be in range(0, 256)". I want to use all 16 analog Pins of my Arduino MEGA2560. What did I wrong? Hope you can help me

    ReplyDelete
  2. Could you please copy the full ValueError exception traceback on your screen and paste it here. T

    Also, please make sure you are using the latest version of pymata-aio. When you start your program, you should see a banner and the version number is printed. The latest version is 2.31.

    ReplyDelete
  3. Traceback (most recent call last):
    File "C:/Users/Tim/PycharmProjects/thesis/pymata.py", line 16, in
    board.set_pin_mode(10, Constants.ANALOG, my_callback)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\pymata3.py", line 598, in set_pin_mode
    self.loop.run_until_complete(task)
    File "C:\Users\Tim\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 584, in run_until_complete
    return future.result()
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\pymata_core.py", line 1186, in set_pin_mode
    await self.enable_analog_reporting(pin_number)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\pymata_core.py", line 722, in enable_analog_reporting
    await self._send_command(command)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\pymata_core.py", line 2035, in _send_command
    result = await self.write(data)
    File "C:\Users\Tim\PycharmProjects\thesis\venv\lib\site-packages\pymata_aio\pymata_serial.py", line 77, in write
    result = self.my_serial.write(bytes([ord(data)]))
    ValueError: bytes must be in range(0, 256)

    Process finished with exit code 1

    I also made sure i have the latest Version of pymata-aio and firmataplus. I just tried your example which is given here: https://github.com/MrYsLab/pymata-aio/blob/master/examples/simple_analog_input_with_callback.py and replaced the analog pin 2 with a 10.

    ReplyDelete
  4. Thanks. I can recreate the problem and am now working on a solution.
    I have moved this as an issue against pymata-aio and you can view the issue and status here:
    https://github.com/MrYsLab/pymata-aio/issues/101.

    ReplyDelete
  5. Sorry the link is incorrect. Here is the correct link:
    https://github.com/MrYsLab/pymata-aio/issues/101

    ReplyDelete
  6. I don't know if you are monitoring the github site or not, but I believe I have fixed your problem with release 2.33. Please post a comment here to let me know if things are working for you or not:

    https://github.com/MrYsLab/pymata-aio/issues/101


    In the future, please either generate an issue in Github if you find a bug, or if you just have a question, please email me at MisterYsLab@gmail.com.


    Thanks

    ReplyDelete
  7. it works! thanks for your fast support! :) have a great day
    and I will keep it in mind if I have any questions next time.:)

    ReplyDelete