|
'***************1 switch***************
program Swtch_1
'*************************************
sub procedure Dlay100
delay_ms(100)
end sub
'*************************************
sub procedure scroll
PortB = %01001001
Dlay100
PortB = %10010010
Dlay100
PortB = %00100100
Dlay100
end sub
'*************************************
'*************************************
sub procedure Sw1
while testbit(PortA,2)= 0
PortB = %11110000
Dlay100
PortB = %00000000
Dlay100
wend
end sub
'************************************
main:
TrisB = %00000000 ' Configure pins of PortB as output
TrisA = %00001111 ' Configure 4 pins of PortA as input (1)
CMCON = %00000111 ' Turn Off the Comparators
If testbit(PortA,2)= 0 Then ' If the switch connects to ground
Sw1 ' Then jump over to the Sw1 routine
End If
scroll ' If nothing happens then go to scroll
goto main
End.
'***********************************
|
Robodyssey Systems manufactures Robot Kits including Autonomous Mobile
Walking Robots, Wheeled Robots, Talking Robots, Expressive Robots, and
Social Robots. We also sell Robotics Accessories including Nexcell NiMH AA
Rechargeable Batteries, Nexcell NiMH AAA Rechargeable Batteries, Battery Holders,
Velcro Straps for Battery Packs, Battery Chargers, Robot Grippers, Hobby Servos,
Servos Modified for Continuous Rotation, Tail Wheels for all Rolling Robotic Platforms,
Polyurethane Skate Wheels with Servo Adapter Hubs, Sharp IR Sensors and Adjustable
Sensor Brackets, Sensor Cables, and Programming Cables. All of our Robot Kits
can be purchased as easy to assemble robot kits or as fully assembled stationary
or mobile robots. Robodyssey uses 1/8 inch aluminum and acetyl for most all of
our mobile robot components and robotics accessories. We provide classroom
training for teachers interested in integrating robotics, computer programming
and electronics into the classroom.
We hope you enjoy our web site. Feel free to use any robotic resources.
Robodyssey is your complete solution for Educational Robotics as well as Hobby Robotics.
|