Programme de mise en bouche
Dependencies: SeeedGrayOLED mbed
Fork of seeed_arch_pro_oled by
main.cpp@2:481ff03f0c92, 2017-01-24 (annotated)
- Committer:
- mr_cub3
- Date:
- Tue Jan 24 18:36:26 2017 +0000
- Revision:
- 2:481ff03f0c92
- Parent:
- 0:6819eb60f94a
blabla
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
danielashercohen | 0:6819eb60f94a | 1 | /* |
danielashercohen | 0:6819eb60f94a | 2 | * Copyright (c) 2012 Neal Horman - http://www.wanlink.com |
danielashercohen | 0:6819eb60f94a | 3 | * |
danielashercohen | 0:6819eb60f94a | 4 | * License: MIT open source (http://opensource.org/licenses/MIT) |
danielashercohen | 0:6819eb60f94a | 5 | * Summary; |
danielashercohen | 0:6819eb60f94a | 6 | * Use / modify / distribute / publish it how you want and |
danielashercohen | 0:6819eb60f94a | 7 | * if you use it, or don't, you can't hold me liable for how |
danielashercohen | 0:6819eb60f94a | 8 | * it does or doesn't work. |
danielashercohen | 0:6819eb60f94a | 9 | * If it doesn't work how you want, don't use it, or change |
danielashercohen | 0:6819eb60f94a | 10 | * it so that it does work. |
danielashercohen | 0:6819eb60f94a | 11 | */ |
danielashercohen | 0:6819eb60f94a | 12 | |
danielashercohen | 0:6819eb60f94a | 13 | #include "mbed.h" |
danielashercohen | 0:6819eb60f94a | 14 | #include "SeeedGrayOLED.h" |
danielashercohen | 0:6819eb60f94a | 15 | |
danielashercohen | 0:6819eb60f94a | 16 | DigitalOut myled(LED1); |
danielashercohen | 0:6819eb60f94a | 17 | |
mr_cub3 | 2:481ff03f0c92 | 18 | SeeedGrayOLED SeeedGrayOled(p9, p10); |
danielashercohen | 0:6819eb60f94a | 19 | |
danielashercohen | 0:6819eb60f94a | 20 | int main() |
danielashercohen | 0:6819eb60f94a | 21 | { |
danielashercohen | 0:6819eb60f94a | 22 | |
danielashercohen | 0:6819eb60f94a | 23 | while(1) { |
danielashercohen | 0:6819eb60f94a | 24 | SeeedGrayOled.init(); //initialize SEEED OLED display |
danielashercohen | 0:6819eb60f94a | 25 | SeeedGrayOled.clearDisplay(); //Clear Display. |
danielashercohen | 0:6819eb60f94a | 26 | SeeedGrayOled.setNormalDisplay(); //Set Normal Display Mode |
danielashercohen | 0:6819eb60f94a | 27 | SeeedGrayOled.setVerticalMode(); // Set to vertical mode for displaying text |
danielashercohen | 0:6819eb60f94a | 28 | |
danielashercohen | 0:6819eb60f94a | 29 | for(char i=1; i < 11 ; i++) { |
danielashercohen | 0:6819eb60f94a | 30 | SeeedGrayOled.setTextXY(i,0); //set Cursor to first line, 0th column |
danielashercohen | 0:6819eb60f94a | 31 | SeeedGrayOled.setGrayLevel(i); //Set Grayscale level. Any number between 0 - 15. |
mr_cub3 | 2:481ff03f0c92 | 32 | SeeedGrayOled.putString("FUCK YEAH!!"); //Print whatever the fuck you want |
danielashercohen | 0:6819eb60f94a | 33 | wait_ms(1.0); |
danielashercohen | 0:6819eb60f94a | 34 | } |
danielashercohen | 0:6819eb60f94a | 35 | |
danielashercohen | 0:6819eb60f94a | 36 | wait(5.0); |
danielashercohen | 0:6819eb60f94a | 37 | } |
danielashercohen | 0:6819eb60f94a | 38 | |
danielashercohen | 0:6819eb60f94a | 39 | } |