Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino 101 microcontroller and a 0.96" OLED display. The Arduino 101 is used to control the OLED display, which shows an animation. The circuit is connected using I2C communication protocol.
Component List
0.96" OLED
- Description: A small OLED display module.
- Pins: GND, VDD, SCK, SDA
Arduino 101
- Description: A microcontroller board based on the Intel Curie module.
- Pins: A5/SCL, A4/SDA, AREF, GND, D13/SCK, D12/MISO, D11 PWM/MOSI, D10 PWM/SS, D9 PWM, D8, D7, D6 PWM, D5 PWM, D4, D3 PWM, D2, D1/TX, D0/RX, AIN, ioref, RESET, 3V3, 5V, VIN, A0, A1, A2, A3, ICSP MISO, ICSP SCK, ICSP MOSI
Wiring Details
0.96" OLED
- GND: Connected to Arduino 101 GND
- VDD: Connected to Arduino 101 5V
- SCK: Connected to Arduino 101 A5/SCL
- SDA: Connected to Arduino 101 A4/SDA
Arduino 101
- GND: Connected to 0.96" OLED GND
- 5V: Connected to 0.96" OLED VDD
- A5/SCL: Connected to 0.96" OLED SCK
- A4/SDA: Connected to 0.96" OLED SDA
Code Documentation
The following code is used to control the 0.96" OLED display using the Arduino 101. The code initializes the display and runs an animation loop.
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_I2C_ADDR 0x3D // or 0x3C
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RST_PIN -1 // Reset pin (-1 if not available)
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RST_PIN);
// OLED Animation: activity
// Code auto-generated by https://wokwi.com/animator, graphics by icons8.com
#define FRAME_DELAY (42)
#define FRAME_WIDTH (64)
#define FRAME_HEIGHT (64)
#define FRAME_COUNT (sizeof(frames) / sizeof(frames[0]))
const byte PROGMEM frames[][512] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,124,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,230,0,0,0,0,0,0,0,230,0,0,0,0,0,0,0,231,0,0,0,0,0,1,192,231,0,112,0,0,0,1,193,199,0,112,0,0,0,3,225,199,0,240,0,0,0,3,225,195,0,248,0,0,0,7,225,195,0,248,0,0,0,7,115,131,129,248,0,0,0,14,115,131,129,220,0,0,7,254,51,131,129,220,31,224,15,252,59,131,131,140,63,240,15,248,59,1,131,142,127,240,0,0,31,1,131,142,240,0,0,0,31,1,199,7,224,0,0,0,31,1,199,7,192,0,0,0,15,1,199,7,192,0,0,0,14,1,206,3,128,0,0,0,14,0,206,3,128,0,0,0,0,0,206,0,0,0,0,0,0,0,254,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,120,0,0,0,0,0,0,0,120,0,0,0,0,0,0,0,120,0,0,0,0,0,0,0,112,0,0,0,0,0,0,0,112,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,124,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,230
