BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Fri Apr 27, 2018 12:08 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Ping sensor coding problems..on ARC32
PostPosted: Thu Nov 15, 2012 10:28 pm 
Offline
Citizen

Joined: Mon Oct 29, 2012 2:19 pm
Posts: 6
I am trying to run a quick program to test my sensor but I cannot even get THAT working. A sample of the code im Trying is below. I have it plugged into Aux2 using a GND, p40 as VSS, and p41 for the data pulses... What am I doing wrong here?

ENABLEHSERIAL
SetHSerial1 H9600,H8DATABITS,HNOPARITY,H1STOPBITS
high p40
rawDist var word
main


HIGH P41 ' make trigger 0-1-0
PULSOUT p41, 42 ' activate sensor
PULSIN P41, 1, rawDist ' measure echo pulse
rawDist = rawDist / 2 ' remove return trip
hSEROUT S_OUT, [13,"time = ", DEC5 rawDist]
pause 100
goto main


Top
 Profile  
 
 Post subject: Re: Ping sensor coding problems..on ARC32
PostPosted: Thu Nov 15, 2012 10:53 pm 
Offline
Citizen

Joined: Mon Oct 29, 2012 2:19 pm
Posts: 6
Ok, spoke with tech support... They said use pin 7 and 8 from aux 1 which would supply the correct 5v - im still not getting any activity from the Ping either on the sensor itself or through the terminal. Any help would be appreciated!


Top
 Profile  
 
 Post subject: Re: Ping sensor coding problems..on ARC32
PostPosted: Fri Nov 16, 2012 11:46 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Note its pin 6(gnd) and 8(vcc) and only on the Rev C ARC32 boards. I suspect its not working because you used pin 7 which isn't a ground.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO