Hey guys, I have a wee little problem with my BotBoard II with a BAP28 installed. Can anyone offer some advice?
– Using the below code and pin assignments, 3 seperate GP2D12’s all return a solid, unwavering 1023 to the debugger on any of the 4 pins. All sensors tested on an oopic immediatly before and after BAP28 tests…
I have a 9V batt connected to VL and a 6V NiMAH to VS for servo power (more about this in a sec…). The power jumper is set to 5V and there is NO jumper connecting VS-VL.
<–below compliments of topic 570–>
AX0 <-> P19
AX1 <-> P18
AX2 <-> P16
AX3 <-> P17
Code:
loop:
my_input var Word
ADIN P19, my_input
debug [DEC my_input,13]
pause 20
goto loop
–Issue 2 goes back to the servo battery, 6V NiMAH on VS. My servos are running off the 9V battery and I can switch off the 6V entirely and servos and BAP all run fine… The jumper is set to VS, the pins are P1 & P2 and signal wires are oriented correctly. ??? What am I doing wrong here? I do have voltage to the screw terminals on the connector. Kinda have a sneaky suspision that there is a short somewhere but dunno, can’t find one. I thought is the jumper was moved that VS power was the only option…?
Ted - CC
ADDED! SUCCESS! I now have the analog working on P0. P16 - 19 are not doing anything analog but hey, this will work. Did I do something wrong earlier?
ADDED! - The VS not working or should I say now, not stopping work, as attributed to a most faulty toggle switch. (the one with the tamiya style connector wired in). Simple fix, I got a ton of switches in a surplus deal with the guys BrainMonkey.us so I soldered a new one in.
Are you sure it’s an Atom Pro and not an Atom28? The Atom 28 doesn’t have the extra analog inputs. If it is a Pro then we would need to see some images and the real code. The code you included shows you are declaring the variable in the loop. This is something that should only happen once. We normally use a serout to the DB9 for debugging. It seams to work better.
Jim, The code I provided came from a topic here… it was supposed to be a test example.
Pretty sure it is a Basic Atom Pro 28… it matches the picture in the .pdf ie, red, tqfn chip etc…
You can take a look at a pic at facebook.com/RobotMagazine . It is the first item on the wall. Tom A. asked me to do a ‘how to’ on FB and I used all Lynxmotion except the 9V battery and box, and the body supplies. The guts… all you. The entire project is also posted at BrainMonkey.us , including the current running code.
I have read through this twice. I’m not sure what you are asking, or what the problem is.
You said there was a power issue that you solved by replacing a bad switch. You said that you can’t get analog 16,17,18,19 to work. Is that the only issue now?
I’m not sure where the test code came from. Compliments of topic 570 is no help.
Simply make the following changes…
my_input var Word
loop:
ADIN P19, my_input
serout s_out,i38400,[dec my_input]
pause 20
goto loop
Then open a terminal and set it to the correct baud rate. You should see the values scrolling in the terminal window.
No worries Jim. I worked around it, got my project done to the point requested and will revisit it in a couple of weeks… LOL I don’t wanna dig the botboard out of the robot right now as it requires a complete dewire to do so.
Topic 570 means topic 570 here on your forum.
Have a great day and I will ping you on step 4 of the build if I cannot solve the issue with your suggestions.