Home » BLOG

Control a mobile robot by using keyboard – Python

An example python program for control a mobile robot with keyboard:

  • keyboard control
  • serial communication

#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
# Author : Mace Robotics (www.macerobotics.com)
# Date : 05/04/2020
# Version : 0.1
#
import serial
import keyboard
import time

print("Control borvo with keyboard")

port = serial.Serial('COM6')
print(port.name)

print("wait..")
try:
  # read keyboard
  while 1:
    if keyboard.is_pressed('8'):  # if key '8' is pressed 
      print('forward')
      port.write(b'FOR!')
      time.sleep(0.5)
    if keyboard.is_pressed('2'):  # if key '2' is pressed 
      print('move back')
      port.write(b'BAC!')
      time.sleep(0.5)
    if keyboard.is_pressed('4'): 
      print('turn left')
      port.write(b'TUL!')	 
      time.sleep(0.5)
    if keyboard.is_pressed('6'):  
      print('turn right')
      port.write(b'TUR!')	 
      time.sleep(0.5)
    if keyboard.is_pressed('5'):  
      print('stop')
      port.write(b'STP!')	 
      time.sleep(0.5)

except KeyboardInterrupt as exception:
  print("\nEnd\n")

Régulateur USB 5V pour dynamo de vélo

Un schéma électronique pour obtenir une tension 5V sur un connecteur USB à partir d’une dynamo de vélo. Une dynamo de vélo délivre une tension alternative monophasée de 6V et une puissance maximale de 3W.

Le schéma électronique

  • Pont de diode, diode zener 6.8V
  • Régulateur step-down LM2575,
  • Condensateur de sortie,
  • Led,
  • Connecteur USB

New design, quadruped – BORVO

Mace Robotics presents the new design for the BORVO quadruped robot, with more bio-inspired legs:

I use 2D CAD software (QCAD) for drawing the legs:

The robot uses 8 JX PDI-6221MG servo motors with a torque of 20 kg. Every leg is equipped with two servomotors with in parallel operation.

I use FreeCAD software to check the reverse kinematics calculations of the legs.

The robot uses a Teensys 3.5 microcontroller to program with Arduino IDE. For the moment, no inertial sensor or foot contacting sensors are used.