Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Nov 24th, 2017
60
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.21 KB
| None
|
0
0
raw
download
clone
embed
print
report
#include "mbed.h"
AnalogIn ain(p20);
DigitalOut led(p21);
int main()
{
float val;
while (1)
{
val = ain;
if(ain < 0.2)
{
led = 1;
} else
{
led = 0;
}
printf("%f\n",val);
wait(0.1);
}
}
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
Rust | 3 min ago | 0.37 KB
GUI trace code
Python | 24 min ago | 8.77 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 31 min ago | 0.39 KB
Untitled
C# | 38 min ago | 0.81 KB
Untitled
C# | 39 min ago | 1.27 KB
Untitled
C# | 40 min ago | 0.99 KB
getNNI
Python | 55 min ago | 0.63 KB
ДЗ Бой с боссом
C# | 57 min ago | 4.19 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!