top of page

Forum Posts

Jason
Apr 15, 2024
In Showcase
Here is a program written by a 10-year-old boy using Mind+ and Bittle as a birthday gift for his mother. Original from: Miel's Bittle Happy Birthday song/dance project for Mom's birthday! what do you think PetoiCamp #Robotics #PetoiChallenge Miel (10-year-old son) used Mind+ to program his Petoi Bittle robot in this project. He wanted to create something original for his mom's birthday, so he combined Play Melody and Perform skill instructions to achieve this result. It took quite some iteration to get all the timings and tones right, but with some perseverance and patience, he managed to get this beautiful result! making his mom so proud! https://www.facebook.com/671720759/videos/3112413675560386/
[Forward] A Gift for Mother's Birthday. content media
3
0
12
Jason
Nov 10, 2023
In Education & Curriculum
A video tutorial series for Petoi Coding Block robotics curriculum. Learn to program Petoi Bittle Family coding robot kit with a Scratch-like programming interface. Easy for kids and teenagers to get started with robot programming.
Petoi Coding Blocks Robotics Curriculum - Video Tutorials content media
1
2
122
Jason
Oct 07, 2023
In Showcase
Here is a lightweight simulator for Bittle from a Petoi customer. https://grgv.xyz/demo/ranger_demo_sept_2023_01/(https://grgv.xyz/demo/ranger_demo_sept_2023_01/)
[Forward] A lightweight simulator for Bittle content media
3
3
112
Jason
Apr 07, 2023
In Education & Curriculum
A new way to program the Petoi robot. It's something like Scratch, quite simple and easy to use. For the details, please refer to the chapter in Petoi Doc Center. Here is a demo to show programming with a double-touch sensor.
Petoi Coding Blocks is ready content media
0
1
215
Jason
Jan 01, 2022
In Software
We have optimized the serialMaster on GitHub recently, there is a new issue we fixed just now: New serial code doesn't work with RPi hat #16(https://github.com/PetoiCamp/OpenCat/issues/16) We encountered a problem: pyserial (version: 3.5) cannot recognize the Raspberry Pi 3B+ serial port "/dev/ttyS0" When using the Raspberry Pi 3B + its own serial port (ttyS0) to connect to the product, use the following command to query the serial device on the Raspberry Pi terminal to find the port numbers of the two serial devices: ls -l /dev ttyAMA0 ttyS0 But only one of the port numbers can be found by calling the pyserial module of python3: python3 -m serial.tools.list_ports -v /dev/ttyAMA0 desc: ttyAMA0 hwid: 3f201000.serial 1 ports found What's more tragic is that we actually use /dev/ttyS0 There are two possibilities to analyze the root cause: 1. There is a bug in the pyserial module 2. The system parameters of the Raspberry Pi 3B+ device are incorrectly configured However, after searching on the Internet for a long time, no relevant authoritative explanation was found. In desperation, combined the characteristics of the product itself and made a roundabout solution: The idea is as follows: 1. If you only use the Raspberry Pi 3B+ own serial port (ttyS0) to connect to the product, at this time the pyserial module can only find one of the ports, and it is not what we need, so directly use "/dev/ttyS0" as a parameter to open it Serial port function: if platform.uname()[1] == 'raspberrypi':     serialPort = '/dev/ttyS0'  # needed when plug in RaspberryPi     ser = Communication(serialPort, 115200, 0.5)     logger.info(f"Connect to usb serial port: {serialPort}.") 2. If you use Raspberry Pi 3B+ as the host computer (use Raspberry Pi 3B+'s USB port, data cable, and on the Bittle side uses USB adapter to connect to the product, in this case, you should use the serial port number "/dev/ttyUSB0" to connect to the product), or While using the Raspberry Pi 3B+'s own serial port (ttyS0) to connect to the Bittle, the Raspberry Pi 3B+'s USB port is also connected to other serial devices. At this time, the pyserial module will find multiple ports, and also consider compatibility with other operating system platforms. Therefore, the following solution is adopted-If you are using Raspberry Pi 3B+, connect directly to the serial port "/dev/ttyS0", send the serial port command, and determine whether to continue to use the "/dev/ttyS0" connection product by checking the feedback of the serial port command If the serial port feedback is an empty string b'', use the first port (port[serialPortIndex]) ("/dev/ttyUSB0") in the serial port number list port_list_number that the pyserial module queried. Communication.Print_Used_Com() port = port_list_number total = len(port) index = 0 for index in range(total): logger.info(f"port[{index}] is {port[index]} ") if platform.uname()[1] == 'raspberrypi': serialPort = '/dev/ttyS0' # needed when plug in RaspberryPi ser = Communication(serialPort, 115200, 0.5) logger.info(f"Connect to usb serial port: {serialPort}.") serialWriteByte(["d"]) time.sleep(0.1) response = ser.main_engine.read_all() logger.info(f"Response is: {response}") if response == b'': ser.Close_Engine() logger.info(f"close the serial port: {serialPort}.") serialPortIndex = 0 # 0 means connect to port[0]; -1 means connect to the last port in the list ser = Communication(port[serialPortIndex], 115200, 0.5) logger.info(f"Connect to serial port: {port[serialPortIndex]}.") Reference: https://forums.raspberrypi.com/viewtopic.php?t=188233 https://pyserial.readthedocs.io/en/latest/tools.html
0
0
47

Jason

Forum Moderator
More actions
bottom of page