...
POST No. 2408126
Python Library for CircuitPython?
2022-04-28 05:20:45 kurteck

I know it has been awhile since I posted here...


But I was wondering if there is a Python library that one would recommend to run on a MicroController.  In particular currently I  am playing around

with CircuitPython and MicroPython on Teensy 4.x boards. 


I am currently in the process of better supporting the UART Direction pin in the MIMXRT port on CircuitPython and am going to experiment using a prototype

board I have which has the setup for a Sparkfun Teensy Micromod.  On this board I have it setup with two buffer chips that are controlled by an IO pin that I can hook up to DXL buss.


I know that there is at least one up in the community library bundle that I believe only supports protocol 1. (https://community.robotis.us/t/command-dynamixel-motors-with-circuitpython-using-the-dynafeather/147)


I may see how hard it would be to strip some of the stuff out of the Python code in DynamixelSDK, but was wondering if you might have one along the lines of the Dynamixel2Arduino library.


Thanks

Kurt

2022-04-28 05:20:45
kurteck
2022-05-02 21:44:47 Kurt Eckhardt

Quick update, 


I have hacked up a copy of the Python code in DynamixelSDK github project and have it at least talking and the like.  Not sure how well yet, but it does ping the AX servos.


I needed to hack up the PortHandler object  right now on the constructor I changed it to pass in:     def __init__(self, tx_pin, rx_pin, dir_pin):


I then needed to change other parts of the port handler to deal with the CircuitPython UART object instead of PySerial.


So far the only change I have had to make to Protocol handlers is the uart.read(n) function may return None which was causing an error on protocol handler.


So changed the rxPacket to test for this before extend...

```

            rdata = port.readPort(wait_length - rx_length)
            if (rdata != None):
                rxpacket.extend(rdata)
```

Not sure how far I will take it, but the current WIP stuff is up in my: https://github.com/KurtE/circuitPython_sketches

project along with some other testing.


Note: on RPI2040 and the Teensy ports, this relies on changes I made to CircuitPython to support the rs485_dir pin on arbitrary GPIO pins.   Not sure yet if they will take these changes.

May work on ESP32, although I have seen issues with their RX Serial returning garbage... There is an Github issue on that.



2022-05-02 21:44:47
kurteck
2022-05-03 11:52:59 Will Son

Hi Kurt,


Thanks for the updates!

FYI, this forum will be replaced to the https://community.robotis.us/ (later this will change to community.robotis.com or so)

I'd recommend to share this valuable information in the community as this board will be closed after 3 months.

Let's continue the discussion in the community so that other developers can join :)


Thanks!

2022-05-03 11:52:59
willson
2022-06-24 03:18:51 noompang

pg slot แนะนำ นับว่าเป็นเกม สล็อต PG SLOT ที่นักเสี่ยงโชคยืนยันว่าแตกดี แตกยับ ฟรีสปินออกรัวๆเล่นแล้วได้เงินจริง ได้เงินไว จากสถิติที่พวกเราได้ไปเก็บรวบรวมมาพบว่าอัตราการชนะอยู่ที่ 97.66 % 

2022-06-24 03:18:51
noompang