So in my school project I need to output an analog signal “Score” from my Cortex. The signal needs to be received by an Arduino which acts as a lcd score board. I have an analog port hooked to each other on both boards. I don’t know how to output an analog signal on my robotc code. Any ideas?
I don’t believe the Cortex can output analog signals directly.
Options:
- Use the output from a motor controller in a motor port
- Use a potentiometer manipulated by a motor/servo connected to the Cortex
If you use the PWM output + a motor controller, the output from the motor controller should be between 0 and battery voltage (~7.2v). Just make sure you don’t fry the arduino with 8v accidently.
First, what range of output signal are you looking to generate, and with what degree of accuracy? What is the expected response time? If it’s just to demostrate it can be done, you have a few simple options. If the demostration you’re to build is supposed to show any serious amount of accuracy, or to have a fast response time, that’s a bit tougher.
What you’re trying to do is use the cortex to perform Digital to Analog Conversion. Circuits that do this are called Digital to Analog Converters, or DACs. While the Cortex has several A/D ports, there is are no D/A ports and no built in DACs in the system.
In addition to the two solutions proposed above, you could also use code to create a simple bit-banged DAC. You could integrate and smooth it with a couple of discrete electronic components. More info means more help, so let us know.
except the speaker port…
And this is why you should always listen to @jpearman. He actually knows.
That’s a really good (and for me, at least, only now) obvious idea.