Permalink
Browse files

added readme, fixed examples, etc!

  • Loading branch information...
1 parent 7ba85ff commit b6c1182fd90978c51d88f143cc94debf0e0367fc @ladyada ladyada committed Mar 2, 2012
Showing with 120 additions and 11 deletions.
  1. +16 −2 Adafruit_SSD1331.cpp
  2. +15 −2 Adafruit_SSD1331.h
  3. +19 −0 README.txt
  4. +18 −0 examples/bmp/bmp.pde
  5. +26 −7 examples/test/test.pde
  6. +26 −0 license.txt
View
@@ -1,7 +1,21 @@
-#include "Adafruit_SSD1331.h"
+/***************************************************
+ This is a library for the 0.96" 16-bit Color OLED with SSD1331 driver chip
+
+ Pick one up today in the adafruit shop!
+ ------> http://www.adafruit.com/products/684
+
+ These displays use SPI to communicate, 4 or 5 pins are required to
+ interface
+ Adafruit invests time and resources providing this open source code,
+ please support Adafruit and open-source hardware by purchasing
+ products from Adafruit!
-// Graphics library by ladyada/adafruit
+ Written by Limor Fried/Ladyada for Adafruit Industries.
+ BSD license, all text above must be included in any redistribution
+ ****************************************************/
+
+#include "Adafruit_SSD1331.h"
#include "glcdfont.c"
#include <avr/pgmspace.h>
#include "pins_arduino.h"
View
@@ -1,5 +1,18 @@
-// Graphics library by ladyada/adafruit
-// MIT license
+/***************************************************
+ This is a library for the 0.96" 16-bit Color OLED with SSD1331 driver chip
+
+ Pick one up today in the adafruit shop!
+ ------> http://www.adafruit.com/products/684
+
+ These displays use SPI to communicate, 4 or 5 pins are required to
+ interface
+ Adafruit invests time and resources providing this open source code,
+ please support Adafruit and open-source hardware by purchasing
+ products from Adafruit!
+
+ Written by Limor Fried/Ladyada for Adafruit Industries.
+ BSD license, all text above must be included in any redistribution
+ ****************************************************/
#define swap(a, b) { uint16_t t = a; a = b; b = t; }
View
@@ -0,0 +1,19 @@
+This is a library for the 0.96" 16-bit Color OLED with SSD1331 driver chip
+
+ Pick one up today in the adafruit shop!
+ ------> http://www.adafruit.com/products/684
+
+These displays use SPI to communicate, 4 or 5 pins are required to
+interface
+
+Adafruit invests time and resources providing this open source code,
+please support Adafruit and open-source hardware by purchasing
+products from Adafruit!
+
+Written by Limor Fried/Ladyada for Adafruit Industries.
+BSD license, check license.txt for more information
+All text above must be included in any redistribution
+
+To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_SSD1131. Check that the Adafruit_SSD1331 folder contains Adafruit_SSD1331.cpp and Adafruit_SSD1331.h
+
+Place the Adafruit_SSD1331 library folder your <arduinosketchfolder>/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.
View
@@ -1,3 +1,21 @@
+/***************************************************
+ This is a example sketch demonstrating bitmap drawing
+ capabilities of the SSD1331 library for the 0.96"
+ 16-bit Color OLED with SSD1331 driver chip
+
+ Pick one up today in the adafruit shop!
+ ------> http://www.adafruit.com/products/684
+
+ These displays use SPI to communicate, 4 or 5 pins are required to
+ interface
+ Adafruit invests time and resources providing this open source code,
+ please support Adafruit and open-source hardware by purchasing
+ products from Adafruit!
+
+ Written by Limor Fried/Ladyada for Adafruit Industries.
+ BSD license, all text above must be included in any redistribution
+ ****************************************************/
+
#include <Adafruit_SSD1331.h>
#include <SD.h>
#include <SPI.h>
View
@@ -1,9 +1,28 @@
+/***************************************************
+ This is a example sketch demonstrating the graphics
+ capabilities of the SSD1331 library for the 0.96"
+ 16-bit Color OLED with SSD1331 driver chip
+
+ Pick one up today in the adafruit shop!
+ ------> http://www.adafruit.com/products/684
+
+ These displays use SPI to communicate, 4 or 5 pins are required to
+ interface
+ Adafruit invests time and resources providing this open source code,
+ please support Adafruit and open-source hardware by purchasing
+ products from Adafruit!
+
+ Written by Limor Fried/Ladyada for Adafruit Industries.
+ BSD license, all text above must be included in any redistribution
+ ****************************************************/
+
+
// You can use any (4 or) 5 pins
-#define sclk 4
-#define mosi 5
-#define cs 6
-#define dc 7
-#define rst 8 // you can also connect this to the Arduino reset
+#define sclk 13
+#define mosi 11
+#define cs 10
+#define dc 9
+#define rst 8
// Color definitions
#define BLACK 0x0000
@@ -19,13 +38,13 @@
#include <SPI.h>
// Option 1: use any pins but a little slower
-// Adafruit_SSD1331 tft = Adafruit_SSD1331(cs, dc, mosi, sclk, rst);
+Adafruit_SSD1331 tft = Adafruit_SSD1331(cs, dc, mosi, sclk, rst);
// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
-Adafruit_SSD1331 tft = Adafruit_SSD1331(cs, dc, rst);
+//Adafruit_SSD1331 tft = Adafruit_SSD1331(cs, dc, rst);
float p = 3.1415926;
View
@@ -0,0 +1,26 @@
+Software License Agreement (BSD License)
+
+Copyright (c) 2012, Adafruit Industries
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holders nor the
+names of its contributors may be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 comments on commit b6c1182

i have ssd1306 i need to send a string to display. it folds and overwrte and display funky letters. that string i get from serial read and i want display it. please help me out. thanks my codes are herevoid loop() {
Wire.beginTransmission(0x3C);
display.clearDisplay();
display.display();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(10,10);

 if (Serial.read ()>0) {
      inByte = Serial.read();
      display.println (inByte);
Owner

ladyada replied May 21, 2017

hiya we do not do tech support in github
please contact the vendor you purchased your screen from for support :)

Please sign in to comment.