In a common cathode display, the cathodes of all the LED segments are connected to the logic "0" or ground. As the name suggests, a CC display has all the cathodes of the 7 LEDs connected when a CA display has all the anodes of the 7 segments connected. There are two types of pin connection: a pin of connected cathodes and one of connected anodes, indicating Common Cathode (CC) and Common Anode (CA). The common pin of the display generally tells its type. So by forward biasing the appropriate pins of the LED segments in a particular order, some segments will brighten and others stay dim, thus showing the corresponding character on the display. The other LED pins are connected together forming a common pin. ![]() These LED pins are labeled from "a" through to "g" representing each individual LED. An additional 8th LED is sometimes used within the same package thus allowing the indication of a decimal point (DP) when two or more 7-segment displays are connected together to display numbers greater than ten.Įach of the LEDs in the display is given a positional segment with one of its connection pins led out from the rectangular plastic package. Each LED is called a segment – when energized, one segment forms part of a numeral (both decimal and hexadecimal) to be displayed. I don't think it is an Adafruit screen, so you can ignore the comment.A 7-segment display is an 8-shaped component which packages 7 LEDs. #define SCREEN_ADDRESS 0x3D ///< See datasheet for Address 0x3D for 128圆4, 0x3C for 128x32Ĭhange 0x3D to 0x3C if you need to (as determined earlier). Locate this line (near the beginning of the code): ![]() Once the library is in place, load the example SSD1306_128X64_I2C If the back of yours looks very different, locate and run an I2C device scanner to find the address of your display.įrom the Arduino IDE, install or update the the Adafruit SSD1306 library, Version 2.57 is what I used to test this. Here is a photo of the back and with the address of 0x3c. If it is on the '0' side, the address is 0x3C if it is on the '1' side, it is 0x3D. Determine the I2C address by flipping it over and seeing which side a 0 ohm resistor or solder blob is on - either 0 or 1.Looks like you have a run-of-the-mill, clone, 128圆4 LCD with / I2C interface. So as far as I know, from the hardware point of view, everything seems to be correct, right? I also saw in Elegoo Uno R3's guide that the A4 and A5 pins are used for the I2C protocol, which is the one that this OLED screen uses: ![]() The exception is the Arduino Nano, Pro Mini, and Mini’s A6 and A7 pins, which can only be used as analog inputs. The analog input pins can be used as digital pins, referred to as A0, A1, etc. My question is: does anybody know if this is right way to do it? Even though I'm using analog pins and the screen needs digital ones, I read online that it doesn't matter: Then, I'm using the code from this tutorial, that is, this code, to see if the setup is correct, but nothing shows up on the screen. ![]() You can see the setup in the following pictures: I have connected every pin in the following way: However, nothing shows up on the screen for some reason. I'm trying to connect the OLED SSD1306 screen to my Elegoo Uno R3 and display something using Arduino IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |