Boe-Bot, Receive Instructions from INI file - Help Needed
JimmyTheGreat
Posts: 9
I have a Parallax Boe-Bot Rev B (the one with a USB) and I would like it to do one of the following things.
1. Get instructions from a INI file. If this can be done with BASIC Stamp that would be great. If it is not possible is there any other way of reading instructions from a INI file and having the Boe-Bot follow them?
This is what the INI file will contain:
[noparse][[/noparse]Commands]
Command=0
2. Have VB.net read the INI file and then control the Boe-Bot. I would have already done this, but unfortunately I don't know how to interface with the Boe-Bot threw VB.net.
Thanks for your help.
1. Get instructions from a INI file. If this can be done with BASIC Stamp that would be great. If it is not possible is there any other way of reading instructions from a INI file and having the Boe-Bot follow them?
This is what the INI file will contain:
[noparse][[/noparse]Commands]
Command=0
2. Have VB.net read the INI file and then control the Boe-Bot. I would have already done this, but unfortunately I don't know how to interface with the Boe-Bot threw VB.net.
Thanks for your help.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
MyValue VAR WORD
SERIN 16, 16468, [noparse][[/noparse]DEC MyValue]
Now, in VB.NET, you have to send "MyValue" as a string, followed by a vbCR.
The BOE-Bot then should do an IF or something against MyValue
IF MyValue = 0 THEN GOSUB DoZeroStuff
http://forums.parallax.com/showthread.php?p=671804
Jeff T.
Also attached copy of the program to receive it on the stamp
·· Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
······· Dim Cmd As Integer
······· Dim CmdParm As Integer
······· Timer2.Enabled = False
······· Cmd = 0
······· If PanChg = Yes Then
··········· PanChg = No
··········· Cmd = 2
··········· CmdParm = HS_PanLR.Value
······· End If
······· If TiltChg = Yes Then
··········· TiltChg = No
··········· Cmd = 1
··········· CmdParm = VSTiltUD.Value
······· End If
······· If TrottleChg = Yes Then
··········· TrottleChg = No
··········· Cmd = 11
··········· CmdParm = TrottleUD.Value + 750
······· End If
······· If HeadingChg = Yes Then
··········· HeadingChg = No
··········· Cmd = 21
··········· CmdParm = Heading.Value
······· End If
······· If SteeringChg = Yes Then
··········· SteeringChg = No
··········· Cmd = 31
··········· CmdParm = Steering.Value + 23
······· End If
······· If Cmd <> 0 Then
··········· SerialPort1.WriteLine("++^++" & Cmd & vbCr & Format(CmdParm, "G"))
······· End If
··· End Sub
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Keep buying replacement parts and sooner or later you will get it RIGHT!
I have attached all the code needed for someone else who might want to do this.
Post Edited (JimmyTheGreat) : 7/17/2008 3:12:30 AM GMT
I want my Boe-bot to act like a switch for connecting two wires together. Is this possible and if so how would I go about doing it? The Voltage threw the switch would not go over 5v.
If the Basic Stamp can't do this then I will just do some mechanical action to connect the switch.
If you don't want to use a relay, you could (depending on what you want to switch) use a switching transistor like a 2N2222 or 2N3606 NPN transistor. You'd have to talk about what you want to turn on and off because the connections depend on what you're switching.
If I got all this working all the coding would be is: 'HIGH pinNumber'?
Basically I want to stimulate a mouse click. I know I could do this programmatically, but for what I need it for I cannot. The mouse could either be a USB or PS/2.
The relay you found is the one I was talking about.
Yes, all you have to do is do a HIGH pinNumber to turn the relay on and LOW pinNumber to turn it off. I suggest you turn off the relay in the initialization portion of your program.
There are other solutions for doing this, but the reed relay is the simplest and most straightforward.
Do make sure you have the diode connected properly across the relay coil with the cathode towards (+) or Vdd and the anode towards (-) or ground.· When you do a HIGH, the I/O pin gets connected internally to Vdd (+5V).· When you do a LOW, the I/O pin gets connected internally to Vss (ground).
Which side of the diode is + or -, Im guessing the black side is -?