Search in The Electromania's Blog

Sunday, 29 November 2015

ESP8266 ESP-12E nodemcu 1.0 SPI OLED Display 128x64 on using U8Glib with esplorer a Non-Arduino IDE

After several days of struggle...finally managed to get 4pin SPI OLED display running on ESP8266  ESP-12E nodemcu 1.0 dev. kit, using esplorer, a Non-Arduino IDE.

The beginning of fun with powerful ESP8266  ESP-12E nodemcu 1.0 Wifi dev kit.



Please note, the display arrived with pin markings that are different than those shown on their website.

 Pin connections between ESP8266-12E  and SPI OLED display
     -- D3 pin of ESP to RES pin of Display
     -- D4 pin of ESP to DC pin of Display
     -- D5 pin of ESP to SCL pin of Display  Hardware SPI CLK  = GPIO14
     -- D7 pin of ESP to SDA pin of Display  Hardware SPI MOSI = GPIO13



--** Same pin out can be used to run the default U8Glib library graphics code available here.

ESP8266 ESP-12 Nodemcu dev kit V 1.0-
http://eu.banggood.com/Wholesale-Warehouse-NodeMcu-Lua-ESP-12E-WIFI-Development-Board-wp-Uk-985891.html 

Display- 0.96 inch 4 pin SPI OLED display with 64x128 resolution
http://eu.banggood.com/Wholesale-Warehouse-0_96-Inch-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-wp-Uk-932606.html


Note- I dont get any royalty from banggood for these projects, I mention this because it makes easy for you all to understand exactly which make electronic device I am using and how to make it work :). I noticed every make has different pin markings.

Monday, 23 November 2015

Arduino Due and OLED Display using U8GLIB library in SPI mode


Getting started with 0.96 Inch 128x64 White SPI OLED Display Module from Banggood using U8GLIB library on Arduino Due.


Thanks to 32bit microcontroller of Arduino Due, the rendering of animation is superfast, compared to previous 8bit Arduino board versions.



U8GLIB  Universal 8bit Graphics Library https://github.com/olikraus/u8glib/ 

Sketch/code for above quick project is available on my GitHub page here
 
//I used following pin connections, you can use any other free pins of your board but make sure to use same pin numbering while calling the constructor in main code.
// 13 - SCL    or   CLK   13
// 11 - SDA    or   MOSI  
// 8  - RES     or   RESET 8
// 7  - DC       or   DC    7
// 10 - keep open

// U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9, 8);    //constructor used to call display



Display purchased from banggood.com
http://eu.banggood.com/Wholesale-Warehouse-0_96-Inch-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-wp-Uk-932606.html

Arduino Due and OLED Display using Adafruit library in SPI mode

Getting started with 0.96 Inch 128x64 White SPI OLED Display Module fusing Adafruit library on Arduino Due.

Thanks to 32bit microcontroller of Arduino Due, the rendering of animation is superfast, compared to previous 8bit Arduino board versions.

Sketch/Code is available on my GitHub page here

Adafruit library:https://github.com/adafruit/Adafruit_SSD1306


//I used following pin connections, you can use any other free pins of your board but make sure to use same pin numbering while calling the constructor in main code.
// 13 - SCL     or  OLED_CLK
// 11 - SDA    or  OLED_MOSI  
// 8  - RES      or  OLED_RESET
// 7  - DC        or  OLED_DC  
// 10 - keep open


Display purchased from banggood.com
http://eu.banggood.com/Wholesale-Warehouse-0_96-Inch-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-wp-Uk-932606.html
Note-I do not get any royalty from above links and purchases you do.

Arduino Due and OLED Display using U8GLIB library in SPI mode- Getting started


Getting started with 0.96 Inch 128x64 White SPI OLED Display Module using U8GLIB library and Arduino Due.

Thanks to 32bit microcontroller of Arduino Due, the rendering is superfast, compared to previous 8bit Arduino board versions.

Sketch/Code is available on my GitHub page here

Universal 8bit Graphics Library,
https://github.com/olikraus/u8glib/

//I used following pin connections, you can use any other free pins of your board.
// 13 - SCL
// 11 - SDA
// 8  - RES
// 7  - DC
// 10 - keep open

Display purchased from banggood.com
http://eu.banggood.com/Wholesale-Warehouse-0_96-Inch-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-wp-Uk-932606.html

IR remote kit LED blink using Arduino Due


IR remote kit LED blink using Arduino Due

Original library available at- https://github.com/enternoescape/Arduino-IRremote-Due  

Led connected to pin 7 of Arduino due
IR receiver photo-detector connected to pin 11

Modified code for this project is-----

//#include "global_def.h"  // These don't seem to work.  They should.
//#include "ms_remote_map.h" // These don't seem to work.  They should.
#include <IRremote2.h>

//#define ms_remote_map.h

#define RECV_PIN 11
#define LED_PIN 7 // choose the pin for the LED

byte ledState;
IRrecv irrecv(RECV_PIN);
decode_results results;
boolean power_state = LOW;

void setup(){
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  pinMode(LED_PIN, OUTPUT);  // declare LED as output
  pinMode(RECV_PIN, INPUT);  // declare LED as output
}

void loop() {
  if (irrecv.decode(&results)) {  //If IR receive results are detected
     Serial.println(results.value, HEX);
   
    if (results.value == 0x143226DB)
     {
     
       digitalWrite(LED_PIN, HIGH);
       delay(1000);
       digitalWrite(LED_PIN, LOW);
     
     }

    delay(200);  // 1/5 second delay for arbitrary clicks.
    irrecv.resume(); // Receive the next value
  }
}

Contact Electromania

Name

Email *

Message *