Coder Social home page Coder Social logo

adafruit_characteroled's People

Contributors

camilstaps avatar ladyada avatar technobly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adafruit_characteroled's Issues

Exemple doesn't work

Hello,

I just got my OLED 16x2 module today, so I wanted to try it using the example given with the library.

This is the render of the "Hello World" exemple on my screen :

img_20130719_153021
Any idea ?

Warm Restart does not work

The source code mentions it would handle warm starts. But in my case, most of the time it shows some "greek" alpha and x characters after a restart and nothing else happens.

Is there some way to fix that?

( I am using the spark core and the adafruit 16x2 oled display)

Warnings when compiling

Just using the provided example sketch HelloOLEDWorld gives:

F:\Documents\Arduino\libraries\Adafruit_CharacterO LED-master\Adafruit_CharacterOLED.cpp:66:101: warning: default argument given for parameter 3 of 'void Adafruit_CharacterOLED::begin(uint8_t, uint8_t, uint8_t)' [-fpermissive]
void Adafruit_CharacterOLED::begin(uint8_t cols, uint8_t lines, uint8_t character_set = LCD_JAPANESE)
^
In file included from F:\Documents\Arduino\libraries\Adafruit_CharacterO LED-master\Adafruit_CharacterOLED.cpp:7:0:
F:\Documents\Arduino\libraries\Adafruit_CharacterO LED-master\Adafruit_CharacterOLED.h:58:8: note: previous specification in 'void Adafruit_CharacterOLED::begin(uint8_t, uint8_t, uint8_t)' here
void begin(uint8_t cols, uint8_t rows, uint8_t character_set = LCD_JAPANESE);
^
F:\Documents\Arduino\libraries\Adafruit_CharacterO LED-master\Adafruit_CharacterOLED.cpp: In member function 'virtual size_t Adafruit_CharacterOLED::write(uint8_t)':
F:\Documents\Arduino\libraries\Adafruit_CharacterO LED-master\Adafruit_CharacterOLED.cpp:244:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^

in the cpp file, changing void Adafruit_CharacterOLED::begin(uint8_t cols, uint8_t lines, uint8_t character_set = LCD_JAPANESE)
to
void Adafruit_CharacterOLED::begin(uint8_t cols, uint8_t lines, uint8_t character_set)
fixes the first warning (should I have to do this???) but the warning still remails:

F:\Documents\Arduino\libraries\Adafruit_CharacterOLED-master\Adafruit_CharacterOLED.cpp: In member function 'virtual size_t Adafruit_CharacterOLED::write(uint8_t)':
F:\Documents\Arduino\libraries\Adafruit_CharacterOLED-master\Adafruit_CharacterOLED.cpp:244:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^

Is this a bug or what should I do? Thanks

Compiler optimization flag -Ofast not working

When i try to compile this lib using a compiler optimization flag other than Arduino default -Os. For example when using -Ofast
I get the following error, which is if I understand it correctly a problem with the library :
In function global constructors keyed to 65535_0_Device.cpp.o.6022':
:(.text.startup+0x7d4): undefined reference to `Adafruit_CharacterOLED::command(unsigned char)'

`

Library uses ENGLISH_JAPANESE character font table

The library seems to use the ENGLISH_JAPANESE character font table and I can't figure out how to change it to WESTERN EUROPEAN.

To demo this, do a
oled.print((char)0xfd);

The rendered char is the "divide sign" (ENGLISH_JAPANESE) instead of the "tall lowercase u" (WESTERN EUROPEAN).
See WS0010 docs pages 5 & 6, right-most column, 3rd to last row.

I tried monkeying with Adafruit_CharacterOLED::begin() but couldn't figure out which instruction sets the Font Table.
I thought it might be this at line 97:
write4bits(0x08);
where the 2 LSB are 00 (FT1:0 = ENGLISH_JAPANESE) and tried setting this to
write4bits(0x09);
where the 2 LSB are 01 (FT1:0 = WESTERN EUROPEAN)
but the display reboots to displaying garbage, so that doesn't seem to be it.

Conflict between MIDI.h and Adafruit_CharacterOLED

Hi
I've found problem and I can't use RX from MIDI.h library at all
TX works.

I tested and I found that this function causes problem of RX pins in all Serial0, 1, 2, 3

void Adafruit_CharacterOLED::waitForReady(void) 
{
  unsigned char busy = 1;
  pinMode(_busy_pin, INPUT);
  digitalWrite(_rs_pin, LOW);	
  digitalWrite(_rw_pin, HIGH);      
  do
  {
  	digitalWrite(_enable_pin, LOW);
  	digitalWrite(_enable_pin, HIGH);

  	delayMicroseconds(10);
  	busy = digitalRead(_busy_pin);
  	digitalWrite(_enable_pin, LOW);

  	pulseEnable();		// get remaining 4 bits, which are not used.
  }
  while(busy);
  
  pinMode(_busy_pin, OUTPUT);
  digitalWrite(_rw_pin, LOW);
}

and this is simple code to check the problem:

#include <MIDI.h>
#include <Adafruit_CharacterOLED.h>
Adafruit_CharacterOLED lcd(OLED_V2, 22, 24, 26, 28, 30, 32, 34);

MIDI_CREATE_DEFAULT_INSTANCE();
bool LED=false;


 void setup()
 {
     MIDI.begin(MIDI_CHANNEL_OMNI);  // Listen to all incoming messages
     MIDI.setHandleNoteOn(MyNoteOnFunction);
     MIDI.setHandleNoteOff(MyNoteOffFunction); 

pinMode(10,OUTPUT);
  
     
 }

 void loop()
 {
     
     // Read incoming messages
     MIDI.read();
     if (LED==true)
     {
      digitalWrite(10,HIGH);//turn on led
     }

}


void MyNoteOnFunction (byte channel, byte note, byte velocity)
{

LED=true;

}

void MyNoteOffFunction (byte channel, byte note, byte velocity)

{

}


}

Standard library LiquidCrystal works correctly and of course it doesn't have that function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.