forked from microbuilder/LPC810_CodeBase
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample02_analogReadSerial.c
More file actions
50 lines (36 loc) · 1.17 KB
/
example02_analogReadSerial.c
File metadata and controls
50 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "sketch_ino.h"
/*** LPC810 Arduino compatible library example ***/
/*
AnalogReadSerial
Reads an analog input on pin 1, prints the result to the serial monitor
This example code is in the public domain.
*/
void setup() {
Serial_begin(9600);
}
void loop() {
int sensorValue = analogRead(A1);
Serial_printnumber(sensorValue);
Serial_println("");
}
/*
Arduino LPC810 compatibility test program
LPC800 Pining ( Arduino pin numbering )
=======================================
________
| U |
reset -| |- digital 0 / analog in A0 / RX
TX / digital 4 -| LPC |- GND
digital 3 -| 810 |- +3.3V
digital 2 -| |- digital 1 / analog in A1
|_______|
Mini Kit Board ( http://www.lpcware.com/lpc800-mini-kit )
=========================================================
________
| U |
reset switch -| |- RX
TX -| LPC |- GND
-| 810 |- +3.3V
test led -| |- ISP switch
|_______|
*/