Kilobots
Last updated: 2019 June 13
Fix Kilogui permissions error
When running this on Linux, I tried to connect to the USB IR controller as a Serial device. I got an error that it couldn’t connect, so check if the device was in use. This message was actually masking a permissions error.
To check the permissions of the selected USB device, run ls -la /dev/ttyUSB0 (or whatever the USB number is). You can one-time change the permissions for the device with chmod 666 /dev/ttyUSB0. I’ve been trying to implement a “permanent” rule change for the device permissions as suggested here, but I haven’t gotten it to work yet.
Debug Kilobots with serial monitor
- Can use Putty, minicom, or any other serial terminal emulator to print out debug statements
- Using minicom:
- Install with
sudo apt-get install minicom - Set up:
sudo minicom -s- Under
Serial port setup:A - Serial Device:/dev/ttyUSB1or something similarE - Bps(baudrate): 38400
Save setup as dfland thenExit from Minicom- If something’s not working, try changing the Hardware/Software Flow Control and restarting minicom
- Under
- Run the monitor:
sudo minicom(sudo minicom -c onif you want pretty colors) - Quit:
Ctrl+a,x
- Install with
- Printing statements to terminal from kilobot:
- Follow this example to add debugging to your code
- To get stuff to print correctly on successive lines (in Linux, at least), put
\r\nat the end of theprintfstatement.