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.
USB/usb.cpp
- Committer:
- jhusnik
- Date:
- 2021-04-08
- Revision:
- 0:77dba5d612e5
File content as of revision 0:77dba5d612e5:
#include "usb.h"
Serial PC(USBTX, USBRX, 9600);
void Start(void){
PC.printf("\n\r Unos vrijednosti u rasponu 0 - 9:\n\r");
}
float Unos(void){
char podatak = PC.getc();
PC.printf("%c\n\r", podatak);
int a;
float b;
a = podatak;
if ((a <= 57)&&(a >= 48 )){
b = (a - 48)/10.0;
}
return (b);
}