Search results

  1. O

    Ultrasonic Sensor Reading Fluctution

    symbol trigPin = B.1 ;Assign pin B.1 to a variable called trigPin symbol range = w1 ;Create a variable called range stored in w1 symbol currentsense = w0 ;Create a variable called currentsense stored in w1 symbol BuzzerPin = B.0 ;Assign pin B.0 to a variable called trigPin ;Motor Control Pin...
  2. O

    Ultrasonic Sensor Reading Fluctution

    Even without the debug, it would still drop to 7 or 4. While I do think that ultrasonic command isn't getting enough time to adjust the variable is true. But when I get rid of the do while loop the in start3, the code will work fine. Don't know why. start3: ;Label, state the start of a...
  3. O

    Ultrasonic Sensor Reading Fluctution

    Description This robot needs to find obstacles (coke cans) by using the ulltrasonic sensor. I written this code in parallel so that the bot can check the distance while it is moving around in circles. While the robot is moving in circles, if the ultrasonic reading goes below 30cm, it would mean...
  4. O

    Ultrasonic Sensor Reading Fluctution

    Ok after some more testing, I have found that the fluctuation is happening because of the do while loop in start3 subsection. But more specifically its because of the line do while range < targetrange... what ever value I put in targetrange it while fluctuate in the value to 0. For example if...
  5. O

    Ultrasonic Sensor Reading Fluctution

    I have been building an obstacle colliding robot. I previously asked for help regarding this, but since it was on a different topic I opened a new thread. So my problem is that every now and then my range reading is dropping to 4 then back to the correct reading. (The number isn't always four it...
  6. O

    Parallel Task, Pause timing off

    So should I code my obstacle colliding robot with single task or parallel task. What do you think will be more efficient. Thanks
  7. O

    Parallel Task, Pause timing off

    Thanks for your help, I went through and look at the resources given. So based on the code I have given above, it means that my PICAXE 14M2 is currently processing all my command a 4mhz since I have 4 start commands. So what would the frequency drop to if I add another start label. Eg start 4...
  8. O

    Parallel Task, Pause timing off

    But doesn't the ultra command only work in 4mhz. Would this work in parallel mode. What is the frequency of PICAXE in parallel mode. Also is readadc also a blocking command because I need this, to check when the motor of the robot have been stalled due to it colliding with an wall. The way I...
  9. O

    Parallel Task, Pause timing off

    So do I just put the mode pin on ground and then only use the one pin for trig and echo. So would I just use start0: pulsout trig,2 pulsin trig,1,range pause 20 let range = range * 10 /58 debug range goto start0 I could get rid of the debug command if needed. Thanks
  10. O

    Parallel Task, Pause timing off

    I don't know because I am using Parallel Tasking where you can't use setfreq, and I don't know what Speed it uses. Also I am using the PICAXE 14M2, in parallel mode. Thanks
  11. O

    Parallel Task, Pause timing off

    Ok I’ll try that. Would you know why my timing pause timing are so off. Like pause 500 lasts for about 4 seconds Thanks
  12. O

    Parallel Task, Pause timing off

    I needed to a code a robot which can collide to its obstacle. I am using the SRF005 Ultrasonic Sensor to measure the distance. However in my code down below, my pauses in parallel task are horribly off, like pause 500 is 4-5 second long. Could anyone please explain this. Also if my range goes...
Top