Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
