Gramps
Senior Member
Not sure how to explain it.In what way is it erratic ?
With two motors it appears to work correctly , but with one motor on the feedback pot is it over shooting? Perhaps that one second delay we asked for is hindering us.
Not sure how to explain it.In what way is it erratic ?
The original idea 10 years ago was to build a robot arm and hand that would copy the motion of a human's.- is intended to do ?
Hippy, your code is operating the hardware correctly! The problem we are experiencing is the desired pot is VERY sensitive. It can can only be moved a tiny amount, but the feedback pot does track it faithfully! What would be the best way spread out the desired pot's sweep range?Not sure why that would be. You can try this -
Yes I thought of that, too, but don't have one handy to test it.using a mult-turn pot
How to do that??adjust the targets and feedback pot mappings so each gives a full 0-1023 reading between extremes.
Context? Whole program?When I change the "Symbol PAUSE_MS " number from 2000 to 1000 the glitch happens each second instead of every 2 seconds.
The demo of the glitch is at post #51 about one minute into the video.Context? Whole program?
Looks like pot noise. The pot is deemed to have moved, the arm moves, it pauses for however long, comes back and the pot is different again, the arm moves, it pauses again, ad infinitum.When I change the "Symbol PAUSE_MS " number from 2000 to 1000 the glitch happens each second instead of every 2 seconds.
We are back to needing to know what the pot readings are at their extremes, calculating what the transfer mapping is for between those extremes giving a 0-1023 results.How to do that??
Is this the the voltage readings across the rails?We are back to needing to know what the pot readings are at their extremes,
Thanks hippie, we really appreciate your help with this. I'm going to lay aside the fine-tuning for the moment and just use the program the way it is. Do you see any big problems with running your code on an 08m2?We are back to needing to know what the pot readings are at their extremes, calculating what the transfer mapping is for between those extremes giving a 0-1023 results.
If you're talking about the code in post 37, how would you plan to map the ports?Do you see any big problems with running your code on an 08m2?
Like this?how would you plan to map the ports?
#picaxe 08m2
#no_data
Symbol DESIRED_POT = C.1 ;ADC pin
Symbol FEEDBACK_POT = C.4 ;ADC pin
Symbol DIRECTION = C.0 ; out pin note: remove terminal command
Symbol MOTOR = C.2 ; PWM pin
Looks good. Time to program a chip.Like this?
YES! it works!Time to program a chip.
Yes a perfect answer for my dilemma. However it's out of stockLook up the BNO055
ATOM Matrix ESP32: https://m5stack.com/products/atom-matrix-esp32-development-kitDo you have a link?
This looks exactly right for my purpose.'nice to have' devices.
Bought one today!Look up the BNO055
Our new 9 DOF gizmo arrived today!Look up the BNO055. ( https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor )
It's a 9-DOF gizmo with all the programming taken care of, so you just get three nice clean signals for roll, pitch, and yaw, with velocities as well.
;Reading the BNO055 9 DOF Absolute Orienation IMU Fusion Breakout board
; SCL connects to C.3
;SDA connects to C.4
#Picaxe 28X2
HSerSetup ???
Pause 1000
i2cslave %0101000, i2cslow, i2cbyte ; set BNO055 slave address
Symbol hi2cin = 4 ;C.3 SCL pin
Symbol hi2cout = 16 ;C.4 SDA pin
main: readi2c; read sensor and debug display
debug
pause 2000
goto main