Quote Originally Posted by gringobomba14 View Post
I found that the program stops here:
ReadSensor: gosub TransferStart : gosub WaitSensor
shiftout dpin,cpin,0,[Sensorcmd\8]
input dpin : cpin = 0
while dpin = 1 : wend
cpin = 1 : pause 1 : cpin = 0
while dpin = 0 : wend '<-----------------program stops here
so obviously the Data pin is not doing what its told to. Any more ideas out there???
How do you know the data pin isn't doing what it's told to do?
How do you know that the sensor received the Sensorcmd correctly in the first place to trigger it to kick back some data at you? Do you even have to wait for the dpin to go low and/or high? How about just pausing for a bit longer and see what happens?