displaying on SSD1306, 128x64 pixels OLED
example_Stick.cpp@12:b4d5e007640e, 2020-02-25 (annotated)
- Committer:
- bvirk
- Date:
- Tue Feb 25 20:59:35 2020 +0000
- Revision:
- 12:b4d5e007640e
- Parent:
- 6:c69f08f464b5
doc removed from cpp files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bvirk | 6:c69f08f464b5 | 1 | #include "MicroBit.h" |
bvirk | 6:c69f08f464b5 | 2 | #include "MicroBitI2C.h" |
bvirk | 6:c69f08f464b5 | 3 | #include "MicroBitPin.h" |
bvirk | 6:c69f08f464b5 | 4 | #include "MicroBitDisplay.h" |
bvirk | 6:c69f08f464b5 | 5 | |
bvirk | 6:c69f08f464b5 | 6 | #include "Display.h" |
bvirk | 6:c69f08f464b5 | 7 | #include "common.h" |
bvirk | 6:c69f08f464b5 | 8 | |
bvirk | 6:c69f08f464b5 | 9 | void example_stick() { |
bvirk | 6:c69f08f464b5 | 10 | |
bvirk | 6:c69f08f464b5 | 11 | while(true) { |
bvirk | 6:c69f08f464b5 | 12 | uint16_t samples =uBit.io.P0.getAnalogValue(); |
bvirk | 6:c69f08f464b5 | 13 | display.setStick(samples/40); |
bvirk | 6:c69f08f464b5 | 14 | } |
bvirk | 6:c69f08f464b5 | 15 | } |
bvirk | 6:c69f08f464b5 | 16 |