This is a enumeration indicating the actions of the car including forward
,back
,right
,left
and stop
.
enum CarActions{Forward,Back,Left,Right,Stop}
the CarMode
represents two modes Manual
and AI
.
enum CarMode{Manual,AI}
and the LaneColorFilter
provides four items for lane's color including white
,blue
,black
and orange
.
enum LaneColorFilter{White,Orange,Blue,Black}
You can use the function to initialize the default output pin for serial port and baud rate
aicar.initSerial()
You can call the function switchMode()
with the argument of CarMode
to switch the mode between Manual
and AI
.
aicar.switchMode(CarMode)
You can call the function carRun()
with the argument of CarActions
to make the car run specific action.
aicar.carRun(CarActions)
You can call the function changeLaneColor()
with the argument of LaneColorFilter
to change lane's color.
aicar.changeLaneColor(LaneColorFilter)
If some errors occurred, you will need to search for it using the full Github repo URL. eg: https://github.com/stem-hanshin/pxt-car/
MIT
- for PXT/microbit (The metadata above is needed for package search.)