Answered step by step
Verified Expert Solution
Question
1 Approved Answer
how do I change my code to go output 0 - 3 3 0 0 mV whenver I turn my potentometer instead of outputting only
how do I change my code to go output mV whenver I turn my potentometer instead of outputting only the printf statement? Also what can i add to my code to make an led go from no light to fully on when turning the potentometer. Here is my code: #include "mbed.h
AnalogIn analogInPinA; Configure analog input GPIO pin using pin A
int main
while
Read ADC input and convert to millivolts
float voltage analogInPin.readf;
Output voltage value to terminal without formatting
printfVoltage: f mVr
voltage;
wait; Wait for seconds
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started