ROBODYSSEY SYSTEMS LLC

Product Catalog
Code Page
Policies
Gallery
Whats New
Press Releases
Resources
Links
Contact Us
About Us
Press

Home Product Catalog Shopping Cart Resources Links
Code Page Policies Gallery

'******************************************************
'********************************************************
'This simple program uses one sharp sensor to determine if something
' is in the happy range. ESRA like company and smiles when somebody is
' around. Don't get too close, ESRA has it's personal space
'******************************************************
'@ Platform: NetMedia BasicX 24
'@ Version: 1.0
'@ Author: Brian Patton (brianp@robodyssey.com)
' Robodyssey Systems, LLC. - www.robodyssey.com
'@ Last Updated: Oh Gosh...who knows.

'******************************************************
'***************** Materials **************************
'
' One Robodyssey Advanced Motherboard
' One Sharp sensor
' One Robodyssey ESRA
'******************************************************
'********************************************************
Option Explicit
Const UpperLip as Byte = 6 ' Pin upper lip servo connects
Const LowerLip as Byte = 5 ' Pin lower lip servo connects
Const EyeLid as Byte = 7 ' Pin Eye Lid servo connects
Const EyeMove as Byte = 8 ' Pin Eye movement servo connects
Const IRSensor as Byte = 13 ' Pin Sharp IR sensor connects
Dim value as Integer ' variable to hold IR input values

'*********************************************************
Public Sub Main()
Do
Call SensorIn ' Main Loop....Keep checking sensor
Loop
End Sub
'*********************************************************
Sub SensorIn () ' First check to see if something too close
value = GetADC(IRSensor) ' Get in data from sharp sensor
If value > 225 Then ' If greater than this then
Call Suprise ' Call the suprise routine
Else ' or.....
Call Divide ' A cheesy way to seperate the date further
End If ' End If process
End Sub
'*********************************************************
Sub Divide() ' Then check if just right or too far
If value > 85 then ' Process the next layer of data from the IR sensor
Call Smile ' Call smile
Else
Call Apathy ' Default is apathy
End If
End Sub
'*********************************************************
Sub Smile ()
Dim t as integer
For t = 1 To 10 ' Timer for smile duration
Call PulseOut(EyeLid, 0.0013, 1 ) ' Pulse Eylid servo approx .0016 center
Call PulseOut(UpperLip, 0.0021, 1) ' Pulse Upperlip
Call PulseOut(LowerLip, 0.0013, 1) ' Pulse Lower Lip
Call Delay(0.018) ' Delay to cause pulse width cycle
Next
End Sub
'*********************************************************
Sub Apathy ()
Dim u as integer
For u = 1 to 15 ' Timer for smile duration
Call PulseOut(EyeLid, 0.0014, 1 ) ' Pulse Eylid servo
Call PulseOut(UpperLip, 0.0015, 1) ' Pulse Upperlip
Call PulseOut(LowerLip, 0.0015, 1) ' Pulse Lower Lip
Call Delay(0.018) ' Delay to cause pulse width cycle
Next
End Sub
'*********************************************************
' This routine causes the lips to curve up like a O then the
' eyes look back and forth. lastly it shuts it's eyes and
' hopes you go away.
Sub Suprise ()
Dim v as integer
For v = 1 to 10
Call PulseOut(EyeLid, 0.0012, 1 )
Call PulseOut(UpperLip, 0.0009, 1)
Call PulseOut(LowerLip, 0.0011, 1)
Call Delay(0.018)
Next
For v = 1 to 15
Call PulseOut(EyeMove, 0.0013, 1 )
Call Delay(0.018)
Next
For v = 1 to 15
Call PulseOut(EyeMove, 0.0018, 1 )
Call Delay(0.018)
Next
For v = 1 to 10
Call PulseOut(EyeMove, 0.0015, 1 )
Call Delay(0.018)
Next
For v = 1 to 50
Call PulseOut(EyeLid, 0.0017, 1 )
Call PulseOut(UpperLip, 0.0009, 1)
Call PulseOut(LowerLip, 0.0016, 1)
Call Delay(0.018)
Next
End Sub


Home Product Catalog Shopping Cart Resources Links
Code Page Policies Gallery

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.