thebotslam

Coding your bot

How does my program talk to my bot's parts?

Every part on your bot sits on a numbered channel: the chassis is always 0, and mounted parts follow in mount order. Your program connects to each part once, at the top (in Python, scanner = Scanner(1)), then sets its commands and reads its readings. Commands go out, and fresh readings come in, each time your program calls wait().

Read the full answer, step by step