ADC Display - Plz help
computer guy
Posts: 1,113
How would I display the results of 2 adc inputs in an x,y box. Like in the windows joystick calibration wizard. (Picture of concept below).
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Comments
Everything else is just a matter of scaling your ADC to match the the dimensions of the box
Graham
If someone could write a program for me that would be great.
My input goes from 0v to 5v. vref is 5v.
0v should be left. 5v should be right.
0v should be down. 5v should be up.
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
It won't take you five minutes to work out how to do this, look:
gr.box(60,-80,60,16)
That is from the graphics demo, do you need to be the best at graphics to use that function?
The other functions are similarly simple you don't need to know anything about video just look at the demo and read the descriptions in the object.
Come on you can do it!
Graham
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
In rare cases you could need a check for smaller than, equal to, or greater than...
Thank you
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Get it coded up to the point where you just need the mathematics and then I'm sure we can help.
But its really just a matter of scaling, you have a position on the screen that is the centre of the box, to that you have to add or subtract a scaled version of your voltage. Remembering that it should add half the width of the box when the voltage is full scale.
Of course when the voltage is 5v the number you have might be 255 for an 8bit ADC or more if you have more bits. If your box was 50 wide then it would be easy just divide the 255 by 10 so when the voltage is 5v you are adding 25 to the central position of the box which is half the width of the box.
So I've sort of told you how to do it but not quite, have a go. The nice thing is that with a graphical output you can see what is going on and guess what the problems might be.
Good luck
Graham
Graham
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller robot.tmcp.com.au
If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
anthonybmyatt@yahoo.com.au
Well done!