Code created for CPRE 288 at Iowa State. ##Table of Contents
- Tiva™TM4C123GH6PM Microcontroller
- Iowa State CyBot
- Baudrate is 115200
- IR Sensor
Additional IR Sensors(WIP)
- Bump Sensors
- Ping Sensor
Cliff Sensor(WIP)Battery Data(WIP)
Drives the CyBot forwards and backwards. [param] is in centimeters.
[param] > 0 ( foward ) [param] < 0 ( backward )
- Drive backwards 10 centimeters:
w-10x
- Drive forward 20 centimeters:
w20x
TURN,ANGLE
Turns the CyBot left and right. [param] is in degrees.
[param] > 0 ( left / co-clockwise ) [param] < 0 ( right / clockwise )
- Turn clockwise 15 degrees:
w-10x
- Turn co-clockwise 45 degrees:
w45x
MOV,DIST
Returns scan data 180 degrees infront of the CyBot, every two degrees.
SCN,SCAN_ANGLE,IR_RAW_VAL,PING_VAL
python 3.9
pyserial
pygame
math
The CyBot is identified by the large white dot, starting in the middle of the window.
The direction of the CyBot is indicated by the green arc on the Player sprite
The direction of the Servo and Scan Angle is indicated by the blue line on the Player sprite
The small red dots indicate IR scan data
Objects detected are indicated by white polygons
The current mode (auto/manual) is indicated in the top left.
The bump sensor data is indicated in the top left, below the mode information.
The position information of the CyBot is indicated in the top left, below the bump sensor
Drive the bot 20 centimeters forwards or backwards
Turn the bot 15 degrees left or right
Take a 180 degree scan and map objects
Take measurements to calibrate IR sensor and update approximation formula
Clears the simulation of scan data
Toggles between Manual and Autonomous mode. On autonomous mode, the bot automatically drives towards the smallest object, while avoiding objects.