JohnieBraaf / Robomaster-Micropython

Robomaster S1 - Micropython CAN BUS controller
GNU General Public License v3.0
25 stars 4 forks source link

Project #1

Open krvcz opened 4 years ago

krvcz commented 4 years ago

So, I do not know if I understood, but at the moment in micropython I can only turn on the blue lamp?

JohnieBraaf commented 4 years ago

Haha, that is true, but I already did much of the research on the protocol. Have a look at proc.py file. I will be reviving this project, so expect some updates and feel free to make requests or contribute.

Basically the firmware can already move gimbal, wheels and blaster, just needs some basic plumbing for the way commands are sent. I will implement the new version of asyncio to create a control loop. Let me know if you can get it to load on your board.

JohnieBraaf commented 4 years ago

Added async event loop and web socket

krvcz commented 4 years ago

ok, yesterday I came back to check with the option of two Can bus and the gimbal was moving, but the motors did not respond. It's was project: RoboMasterS1Challenge/robomaster_s1_can_hack

JohnieBraaf commented 4 years ago

Why do you want to use 2 can busses? Can you try loading the micropython code and let me know if it works for you? Do you really need ROS? Trying to understand what you want to achieve.

krvcz commented 4 years ago

I just want to check if the older solutions work, because the newest ones with one CAN do not necessarily work. First, I wanted to do as in the previous topic using ROS. In one solution, the robot connects to the ROS, but only the gimbal moves. If ideas run out, I will try micropython

JohnieBraaf commented 4 years ago

Implemented simple keyboard controller to move the robot with arrow keys via tcp ip callback

SiChiTong commented 3 years ago

Dear sir I want to try the function of your work But I would like to know

I can not let the board and s1 communicate to each other: Do I need a CAN RXTX - HL convertor? I plug the board serial to putty terminal it shows the led2 is on and pulling "passing" to the terminal

What should I do to get rid of this!?

JohnieBraaf commented 3 years ago

Yes you need a canbus HL converter.

You need to connect it to the gimball for example and unplug the control unit (with antennas)

JohnieBraaf commented 3 years ago

@SiChiTong see https://github.com/RoboMasterS1Challenge/robomaster_s1_can_hack/issues/2#issuecomment-726994172

SiChiTong commented 3 years ago

Thanks for your quick reply Would I know which pin I need to plug? Currently I make it with a convertor and using the CAN1 Is it correct because I just can guess the port from the python code and don't know if it is the work.

Also is it a rx-rx/ tx/tx connection for the converter connection?

Many thanks for your kind reply at all tb_image_share_1636090095374

image PF263516 en feature-description-include-personalized-no-cpn-medium_edit_85231585009390 IMG_20211105_135410 Are there only two wires needs to connect to the board?

JohnieBraaf commented 3 years ago

https://github.com/JohnieBraaf/Robomaster-Micropython/blob/52850fdd8ca61c90da359a89ea1c384295e13800/robo.py#L10

Yes CAN 1, photo might be incorrect, I meant to show where I connected it to the S1