Hi there, For those of you, who are using the Bluetooth-module I wrote some lines to make Nybble do random stuff within random time intervals. All the actions are send from the computer via Python PySerial and give "life" to Nybble. The next step is to read out the ultrasonic sensor via the serial port and implement obstacles avoidance. I already implemented the ultrasonic sensor via protothreading (see my other post named Protothreading) without losing movement performance. The serial port would be a substitution of the Raspberry Pi as a "Brain" and might be more efficient concerning battery usage. Make sure to set up the correct serial port in the code. import time
# Establish serial connection via PySerial
ser = serial.Serial(
port='/dev/rfcomm0', # Change according to your port
catStuff = ['kbalance', 'kwkF', 'kwkF', 'kwkF', 'kwkL','kwkR', 'ksit', 'khi', 'kbuttUp', 'kpee', 'd', 'd', 'd', 'kbk', 'klu']
currentAction = 'kbalance'
currentAction = random.choice(catStuff)