Monday, 15 June 2015

List of Contents


This is the User Guide for the Induino R3 / R4 / R5 from Simple Labs. The Induino R5 is the latest in the Induino Series of Low Cost Arduino clone boards from Simple Labs. The user guide focuses on making use of the Induino R5 board effectively & Interfacing different components. This is a constant work in progress so if something looks incomplete, it means we are working on it and will update it soon. If you are in a hurry, drop us an email. Enjoy!

http://www.simplelabs.co.in/821-thickbox_leometr/induino-r5-arduino-r3-usb-clone-board.jpg


Induino R3 Blog Overview - List of Contents (For Easy Navigation!!!)
  1. What is Arduino? What is Induino? Lets get Some Clarity
  2. Induino R3 / R4 / R5 - An Overview
  3. Simple Labs' Induino R3 / Induino R4 / Induino R5 and Arduino Uno Comparison
  4. Driver Installation
  5. The Basics of Working with Induino R3 / Arduino
  6. Digital Outputs - What, Where & How? - Working with the 3 on-board LEDs
  7. Digital Inputs - What, Where & How? - Working with the 3 on-board Push Buttons
  8. Serial Communication - What, Where & How?
  9. Analog Outputs - What, Where & How? - Working with the RGB LED
  10. Analog Inputs - What, Where & How? - Working with the on-board LDR
  11. Sensor Interface & Interfacing External Sensors - Variable Resistors, LM35 & HC-SR04
  12. Interfacing a TV Remote with the on-board TSOP Remote Control Receiver
  13. Generating Remote Control Signals using the on-board IR LED
  14. Servo Interfacing -  Working with the on-board Servo Interface
  15. LCD Interfacing - Working with the Simple Labs LCD Shield
  16. I2C Communication - What, Where & How? - Interfacing with the Simple Labs RTC Module
  17. I2C Communication - Interfacing Sensors -  MPU6050, BMP085 & HMC5883L 
  18. Interfacing with the Real World - Working with the Simple Labs Relay Control Board
  19. Interrupts - What, Where & How? - Working with the Simple Labs DTMF Control Board
  20. Interfacing Serial Devices - Part 1 - Working with the BTBee PRO / Xbee
  21. Interfacing Serial Devices - Part 2 - Working with a Serial RFID Reader
  22. Interfacing Serial Devices - Part 3 - Working with a Serial GSM Modem
  23. SPI Communication - What, Where & How? - Working with the W5100 Ethernet Shield
  24. Interfacing Sensors - Microphone Sound Detection Sensor
  25. LCD Interfacing - Creating Custom Characters and a Bar Graph
  26. PORT Manipulation & 7 Segment LED Interfacing - Working with the Simple Labs Seven Segment cum DTMF Shield
  27. Interfacing the 0.96" I2C OLED Display

15-June-2015 - Induino R4 replacing the Induino R3

Induino R4 is the latest revision to our Induino series of Boards. The Induino R4 will replace the Induino R3.

Induino R4 is the same as the R3 excepting the following 2 changes

1) Removal of the General Purpose Prototyping Area

2) Addition of a 4 Pin I2C Header in that Area to Allow Direct Plugging in of 0.96" I2C OLED Displays.

All existing code / tutorials / examples for the Induino R3 will work on the Induino R4 as it is. The OLED interface is the only addition. Soon we will publish an OLED version of all example codes using LCD currently.

Here are pictures of the Induino R4. The oled display is just for illustrative purposes and does not come with the Board. However the display is included as part of various kits for the Induino.





Friday, 12 June 2015

Interfacing the 0.96" I2C OLED Display

I2C OLED Display

The 0.96" I2C OLED Display is a simple display with plenty of options for displaying text and graphics in monochrome. The display hooks up to the I2C bus and can be accessed using the Address 0x3C. The display is a 128 x 64 Display where it has 128 pixels for every row with a total of 64 rows.

Hooking it up

All it needs to work is 4 lines of connection (SDA, SCL, Vcc, Gnd). You don't need any pullups. Should you have the latest version of the Induino, The Induino R4, you don't even have to use physical wires! the board comes with a Direct Plug in Header for the 0.96" I2C OLED display. Just plug it in and you are good to go!

For Induino R3 or Arduino

For Induino R3 or Arduino

For Induino R3 or Arduino

Plug in Directly on the Induino R4
One you are done with the connections, download this excellent library from DigiSpark. If You are wondering how to install this library? check this -> http://arduino.cc/en/Guide/Libraries

The Digispark OLED library offers a number of functions that we can use. The library creates a default object called oled and functions can be called through this object.

The Functions
  • oled.begin() - > This function intialises communication with the oled and does the basic oled setup required.
  • oled.fill(fill color) -> This function fills the display with the chosen fill color. In our case since we are working with a monochrome oled. its only possible to fill it with black or blue(white). use oled.fill(0xFF) to fill the screen with white color and oled.fill(0x00) to fill the screen with black color.
  • oled.clear() -> This function clears the display.
  • oled.setCursor(x,y) -> This function sets the cursor in the given x,y position. X is the coloumn value in pixels and Y is the row value. X can have any value starting 0 - 127. Y can have any value from 0-7. Take font sizes into consideration when deiciding on X & Y values
  • oled.setFont(font size) -> This function sets the font size to be used. There are 2 font sizes available. oled.setFont(FONT6X8) sets the font to be used as a smaller font with each font taking up 6 x 8 pixels. So you can have a total of 168 characters.  oled.setFont(FONT8X16) sets the font to be used as a larger font with each font taking up 8 x 16 pixels. So you can have a total of 64 characters. 
  • oled.print(text/value) -> This function prints the text / value given. oled.print("hello world")
  • oled.println(text/value) -> This functions prints the text / value given and then positions the cursor at the beginning of the next line
  • oled.off()-> Turns the display off
  • oled.on() -> Turns the display on if it has been turned off
  • oled.invert(parameter) -> Inverts the display when the parameter passed is 1 and restores the display when the parameter passed is 0. oled.invert(1) or oled.invert(0)

The Code

Here's a simple code to display hello world and explore the various functions



/*  Induino R3 User Guide - Program 22.0 - 0.96"I2C OLED Usage Example using the Induino R3 */

/* This program explore various functions of the DigisparkOLED library using the Induino R4*/

#include <DigisparkOLED.h> // Header for the OLED library
#include <Wire.h>

void setup()
{
  // Initialise Communication with the OLED
  oled.begin();

  // First lets print the line numbers
  // Lets Set the Font to small size. This font takes up one row per character (for the height!)
  oled.setFont(FONT6X8);
  oled.setCursor(0, 0);
  //Print the first number using a println so that the cursor is automatically positioned at the start of the next line. Then repeat this till the last number
  oled.println("1");
  oled.println("2");
  oled.println("3");
  oled.println("4");
  oled.println("5");
  oled.println("6");
  oled.println("7");
  oled.println("8");

  // Set the Font to large size. This font takes up two rows per character (for the height!) as agains the small font that takes up one row per character
  oled.setFont(FONT8X16);

  // Position the Cursor to print Hello in the middle of the Screen. Given the font size and that we have 8 rows in total, printing on the 4th row will take up the 4th and 5th rows
  // leaving the first and last 3 rows empty
  // given that the 5 characters hello take up 40 pixels, we can print from the 45th pixel to keep it at the center
  oled.setCursor(45, 3);
  oled.print("HELLO");
  delay(5000);
  // Lets turn off the display
  oled.off();
  delay(5000);

  // Lets turn on the display
  oled.on();
  delay(5000);

  // Lets invert display
  oled.invert(1);
  delay(5000);

  // Lets restore the inverted display
  oled.invert(0);
  delay(5000);

  // lets wait for some time
  delay(10000);

  // finally clear the screen
  oled.clear();


}

void loop()
{


}


Thats It For This Part! Enjoy... and feel free to drop us an email with questions you might have -> info@simplelabs.co.in

Visit www.simplelabs.co.in for more interesting products

Back to List of Contents