Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- MarlonQ
- Date:
- 2019-04-16
- Revision:
- 0:4da94607d8a6
- Child:
- 1:98ee9aaad63b
File content as of revision 0:4da94607d8a6:
#include "mbed.h"
AnalogIn analog_value0 ( A0 );
AnalogIn analog_value1 ( A1 );
float In[1] = {};
int main() {
printf(" Leyendo el Joystick \n");
while(1) {
In[0] = analog_value0.read(); // Converts and read the analog input value (value from 0.0 to 1.0)
printf(" X = %.04f \n", In[0]);
In[1] = analog_value1.read(); // Converts and read the analog input value (value from 0.0 to 1.0)
printf(" Y = %.04f \n", In[1]);
wait (1);
}
}