![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
labirent
Dependencies: mbed mbed-STM32F103C8T6 ultrasonic HCSR04
Revision 0:b3e42dad6af5, committed 2019-02-16
- Comitter:
- Urti
- Date:
- Sat Feb 16 14:33:33 2019 +0000
- Commit message:
- Labirent Cozen
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HCSR04.lib Sat Feb 16 14:33:33 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/antoniolinux/code/HCSR04/#86b2086be101
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Feb 16 14:33:33 2019 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "stm32f103c8t6.h" +#include "hcsr04.h" + +HCSR04 sensor(PA_10,PA_9); +DigitalOut led(PB_12); + +int main(){ + while(1){ + long dist=sensor.distance(); + if(dist<20){ + led=1; + }else if(dist>20){ + led=0; + } + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-STM32F103C8T6.lib Sat Feb 16 14:33:33 2019 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#727468adfd1d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Feb 16 14:33:33 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ultrasonic.lib Sat Feb 16 14:33:33 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/teams/Lets-work-together/code/ultrasonic/#45102840f1b3