SwarmRobot-Uno and Software Architecture
Jump to navigation
Jump to search
Contents
Overview
Exploring .....
Later stages will investigate use of this approach in the AtTiny SwarmRobot.
Progress
- made a robot prototype based on Arduino UNO board.
- made a sensor receiver and transmitter shield
- designed the architecture of software.
- Coding the class of Sensor.
- demonstrated succesful object detection using simple Infrared system
Architecture of Software
- Four kinds of objects: Sensor, Motor, Messager, Action.
- Two threads: 'main process' and 'timer interrupt process'
Attachments in detail:
Message format for communicating
- baud rate: 2k bit/s( it depends on: 1.the min signal pulse width, here I take 500us. Constraint: must be less than the half of 38k.)
- start bit: 3 bits of 0 (using the low output of IR-receiver as the 0 bit)
data:
typedef struct{ uint8_t ReceiverID; // send from LSB uint8_t SenderID; uint8_t MessageID; uint8_t Para; uint8_t VerifyFirst; // Verify bytes, the value should be equal to the value of ReceiverID uint8_t VerifyLast; // Verify bytes, the value should be equal to the value of the l Para }TxRxBuf_stru;
- verification: using repeating data as above.
- Stop bit: null.
- Message transfer rate: 2K bits/51 bits=39, 39 messages per second.
- collision detecting: thinking:)
Problem
1. about emitting infrared of prototype robot : when change signal from 0 to 1 on the 38k PWM, there is a very strong infrared at the start of changing that can enable all four IR-receivers. I'll go to Xinchejian and to solve the problem tonight.