Information

Discussion Forum

This group does not have any discussions yet.

Comment Wall

Comment by eric gregori on July 20, 2013 at 7:22pm

RFO BASIC program - STEMBot1 following a compass heading

REM Start of BASIC! Program


SENSORS.LIST list$[]
ARRAY.LENGTH size,list$[]
FOR index = 1 TO size
REM print list$[index]
NEXT index

SENSORS.OPEN 3

loop:
SENSORS.READ 3, p1, p2, p3

p1=ROUND(p1/4)

if p1<40 then p1=40
if p1>50 then p1=50
print p1;

speed = (p1-45)*2+93
leftservo = 83+speed
rightservo = 103-speed
leftservo = ROUND(leftservo)
rightservo = ROUND(rightservo)
SERVO 0,5,leftservo, rightservo
PRINT ",";
PRINT leftservo;
PRINT ",";
PRINT rightservo

GOTO loop

Comment by eric gregori on July 20, 2013 at 7:23pm

RFO BASIC Program - Voice Controlled STEMbot1 

REM Start of BASIC! Program

loop:

servo 0,5,93,93
STT.LISTEN
STT.RESULTS thelist
LIST.SIZE thelist,thesize
IF thesize < 1 THEN GOTO loop
LIST.GET thelist, 1, thetext$
LIST.CLEAR thelist
PRINT thetext$
IF thetext$ = "forward" THEN
GOTO forward
ENDIF
IF thetext$ = "right" THEN
GOTO right
ENDIF
IF thetext$ = "left" THEN
GOTO left
ENDIF

GOTO loop


forward:
SERVO 0,5,83,103
pause 5000
GOTO loop

right:
servo 0,5,83,83
pause 2000
GOTO loop

left:
SERVO 0,5,103,103
pause 2000
GOTO loop

Comment by eric gregori on July 20, 2013 at 7:28pm

RFO BASIC Android code

This is open source project is a class for controlling STEMbot1 that you can include in your own Android projects.

https://code.google.com/p/emgrobotics-a2scb-a2mcb-android-driver-cl...

Comment by eric gregori on September 21, 2013 at 6:14pm

Comment

You need to be a member of STEMbot1 to add comments!

 

Members (4)

 
 
 

EMGRobotics

© 2014   Created by eric gregori.

Badges  |  Report an Issue  |  Terms of Service