Tag Archives: programming

Robot rulez

Thinking of an approach that would allow Emergence, David and I tried to identify some of the rules that will control the robots’ behaviour:

check status: horizontal or vertical
> if vertical then stop motors (?)

check status: upside up or upside down
> if upside down, change motor direction

check light intensity:
> compare to previous value
>> if higher than previous value 
>>> if more on right side, turn right (e.g.  stop right  motor)
>>> if more on left side, turn left (e.g. stop left motor)
>>> if equal go straight
>> if lower than previous value, change motor direction (go backwards)

check status: collision
> check if wall or other robot
>> if wall, then turn
>> if other robot check if it's its front or back
>>> if front, then keep going
>>> if back, follow its orders (e.g. left and right LED)

check status: following other robot? 
> if yes, follow its orders (e.g. left and right LED)

--

light/color gradient on floor

check light intensity:
> compare to previous value
>> if higher/lower than previous value, keep going
>> if lower/higher than previous value, turn (in one or random direction)

Flattr this!