|
'******************************************************
'*****************Simple Three A to Ds ****************
'In this set of simple experiments we will work together
'to build the skills needed for many BasicX applications.
'
'Simple A to D with three pins or channels
'******************************************************
'@ Platform: NetMedia BasicX 24
'@ Version: 1.0
'@ Author: Brian Patton (brianp@robodyssey.com)
' Robodyssey Systems, LLC. - www.robodyssey.com
'@ Last Updated: Jan 10, 2004
'******************************************************
'***************** Materials **************************
'
' One Robodyssey Advanced Motherboard
' Three Input Devices (Sharp sensor, Voltage Divider Board, etc)
'******************************************************
Option Explicit
'// Declare Constants //
Public Const Sensor1 As Byte = 13
'Lets call pin 13 "Sensor1"
Public Const Sensor2 As Byte = 14
'Lets call pin 14 "Sensor2"
Public Const Sensor3 As Byte = 15
'Lets call pin 15 "Sensor3"
'// End //
'******************************************************
Public Sub Main() ' Main programming area
'// Your code goes here //
Do ' Beginning of a loop
Debug.Print "Sensor values ";" Sensor1 "; CStr (GetADC(Sensor1)) ; " Sensor2 "; CStr (GetADC(Sensor2)) ;" Sensor3 "; CStr (GetADC(Sensor3))
Debug.Print " "
' Debug.Print displays to the computer..
' the text and the converted value for
' Sensor1
Delay(2.0) ' Delay 1/2 second..makes it readable
Loop ' Do it over and over
'// The end of the program space //
End Sub
|
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.
|