Oledscreen program

Dependencies:   Adafruit-GFX-MbedOS6 Adafruit_SSD1331_MbedOS6

Committer:
macez
Date:
Tue Jan 19 11:35:27 2021 +0200
Revision:
0:f9d16642e61a
1st Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
macez 0:f9d16642e61a 1 /* mbed Microcontroller Library
macez 0:f9d16642e61a 2 * Copyright (c) 2019 ARM Limited
macez 0:f9d16642e61a 3 * SPDX-License-Identifier: Apache-2.0
macez 0:f9d16642e61a 4 */
macez 0:f9d16642e61a 5
macez 0:f9d16642e61a 6 #include "mbed.h"
macez 0:f9d16642e61a 7
macez 0:f9d16642e61a 8
macez 0:f9d16642e61a 9 // Blinking rate in milliseconds
macez 0:f9d16642e61a 10 #define BLINKING_RATE 500ms
macez 0:f9d16642e61a 11
macez 0:f9d16642e61a 12
macez 0:f9d16642e61a 13 int main()
macez 0:f9d16642e61a 14 {
macez 0:f9d16642e61a 15 // Initialise the digital pin LED1 as an output
macez 0:f9d16642e61a 16 DigitalOut led(LED1);
macez 0:f9d16642e61a 17
macez 0:f9d16642e61a 18 while (true) {
macez 0:f9d16642e61a 19 led = !led;
macez 0:f9d16642e61a 20 ThisThread::sleep_for(BLINKING_RATE);
macez 0:f9d16642e61a 21 }
macez 0:f9d16642e61a 22 }