E-Paper Device (EPD) based MiniNote module, powered by mbed on LPC1114FBD48. Shared in public domain with enclosure in 3D step format, hardware interface compatible with microBUS interface. Anyone can contribute on this project.
E-Badge MiniNote Project on mbed/NXP LPC1114 platform
- About E-Badge MiniNote Project
- E-Badge Firmware Design
- Enclosure ID in 3D step format
- Python utilities
- Demo applications
- New applications with cloud server
- make mbed looks Arduino compatible
- debug in Keil, shared with mbed
- make it bigger with more memory
- make it smaller with mini connector
- make it stronger with mikroBUS
- Make it pretty with line art
- Developement Status Update
Diff: main.cpp
- Revision:
- 2:bb9f154ea2f4
- Parent:
- 0:33994cfad0c2
- Child:
- 3:1fa000d4da94
--- a/main.cpp Sun Jun 01 03:20:40 2014 +0000 +++ b/main.cpp Mon Jun 09 11:01:38 2014 +0000 @@ -1,7 +1,8 @@ #include "mbed.h" -//#include "ssd1306.h" #include "ssd1606.h" -#include "Ebadge.h" +//#include "Ebadge.h" +#include "_24LCXXX.h" +#include "rom_image.h" #define STX 0x02 #define ETX 0x03 @@ -13,7 +14,7 @@ // naked LPC1114 on breadboard, install LED pin28, pasive piezo-buzzer pin1 DigitalOut myled(dp28); // LED ... P0_7 (pin 28) Serial uart(dp16, dp15); // UART .. P1_7: TX (pin 16), P1_6: RX (pin 15) -PwmOut pwm(dp1); // PWM ... P0_8: CT16B0_MAT0 (pin1); sorry, blocking SPI! +//PwmOut pwm(dp1); // PWM ... P0_8: CT16B0_MAT0 (pin1); sorry, blocking SPI! uint16_t xmtptr; @@ -21,15 +22,41 @@ //SSD1306 display(dp2,dp4,dp5,dp6,dp10); // SSD1606(cs, rst, dc, clk, busy, data); -SSD1606 display(P0_6,P0_7,P2_0,P1_10,P1_5,P1_11); +SSD1606 epd(P0_6,P0_3,P2_0,P1_9,P1_10,P1_11); + +I2C i2c(P0_5, P0_4); +_24LCXXX nvmem(&i2c, 0x50); -char c; +//enum EEPROM::TypeEeprom T24C256; +//EEPROM fram2(P0_5,P0_4,0xA0,T24C256); + +char c = '0'; +unsigned char sbuf[128]; void setup() { - //char c = '0'; - pwm.period(0.001); // PWM period 1ms (1kHz) - uart.baud(115200); // Baud rate - uart.puts("\n\rE-Badge Demo\n\r"); + //pwm.period(0.001); // PWM period 1ms (1kHz) + uart.baud(115200); // Baud rate + //uart.puts("E-Badge MiniNote LPC1114 Demo Start.\n\r"); + //nvmem.write(0x10,0x55); + epd.initialize(); + epd.clear(); + epd.update(); + epd.rom_image(gImage_one); + +/* + epd.test_image(TEST_BLK); + wait(3); + epd.test_image(TEST_GREY2); + wait(3); + epd.test_image(TEST_GREY1); + wait(3); + epd.test_image(TEST_WHT); + wait(3); +*/ + nvmem.byte_write(0,1); + nvmem.byte_write(1,2); + nvmem.byte_write(2,3); + nvmem.byte_write(3,4); } void loop() { @@ -43,16 +70,6 @@ setup(); while(1) { // repeat (period 1sec) - /* - myled = 0; // LED on - pwm = 0.5; // PWM duty cycle 50%, tone 1kHz - wait(0.5); - uart.putc(c++); if (c > '9') c = '0'; // Put Character & rotate 0,1,2,... 9 - myled = 1; // LED off - pwm = 0; // PWM stop, silent - wait(0.5); - uart.puts(" Hello world.\n\r"); // Put String "Hello..." - */ loop(); } }