Hot answers tagged

10

This is done by carefully placing a layer of wood veneer over the 7-segment displays. The veneer is thin enough to let the light pass through. I wouldn't be surprised if some manufacturers use brighter than normal LEDs to make the display easier to see. Here is a video detailing an example. It is also possible to simply drill out the wood to make it very ...


7

The answer depends on exactly how the sketch is meant to respond to the user interaction. External interrupts If the interaction depends on responding very accurately to the rising or falling edge of an input event (as in your example), then an external interrupt may be the way to go, if possible. This is particularly important if the input event might be ...


6

Here's the first line of your code: #define dw 8; //buttons down Here's the first error line: pinMode(dw, INPUT); Let's put them together and see what we get: pinMode(8; //buttons down, INPUT); That's not valid C++. Using the output I've shown you, modify the input until it looks correct. And then keep doing it until the code compiles.


6

Just as a complement to Paul's answer, I wrote a short program to show how to drive the 7-segment 4-digit display of his figure: This is actually a common cathode display, so the program assumes that, as well as the particular wiring of the figure. The interesting part is the refresh_display() function, which should be called periodically. The algorithm is ...


6

240 by 320 pixels. That's 76800 pixels. In your example it looks like you want 3 bytes per pixel, so that's 230400 bytes. An Arduino Mega has 8K bytes of SRAM memory. There's enough room in the memory on the Arduino Mega to hold 0.003% of your image. Maybe you could store the image on an SD card and put it on the screen little piece by little piece, ...


6

You need to implement hysteresis. Set two temperature points around set_temp. One a little higher to be a limit for turning the heater off and a one a little lower then set_temp to turn the heater on. You only need to change your if else condition a little if (current_temp < set_temp - HYST_VALUE) { digitalWrite(ssr_u, HIGH); } else if (current_temp &...


5

Trying to capture analog video such as VGA and transmit it over Ethernet is going to be technically challenging, and of questionable wisdom (at least without compression). A conventional ATmega-based Arduino is just about the worst contemporary platform you could choose for this job - even aside from the VGA issue, it is a poor choice for Ethernet requiring ...


5

The first thing you do is ask Google for a datasheet. It tells you: http://www.robotshop.com/media/files/pdf/datasheet-com-09483.pdf Then you can read the datasheet and find the pin diagram: That tells you that it is a Common Anode LED display - which means that for each digit all the Anodes (positive pins) of the LEDs are wired together. Further, all ...


5

The U8glib user reference page mentions a couple of ways to print the value of a number using ASCII characters. Eg, following the idea at the second mention of sprintf at above link: char buf[9]; sprintf (buf, "%d", a); u8g.drawStr(33, 33, buf); Edit: The above follows the example at the link, but I've struck it out because in general snprintf is safer ...


5

You can change the pre-defined maximum number of digits at the top of the SevSeg.h header file to as many as 10, if you use long or unsigned long when you call setNumber. It is defined here, on line 27: #define MAXNUMDIGITS 8 //Increase this number to support larger displays This the version referenced from the Arduino Playground SevSeg. Be sure to use ...


5

I'll try and take you through the complete basics of LED's etc. As 4-digit 7-segment displays are a combination of multiple "LED techniques". Wiring LED's LED's, or Light Emitting Diodes, are one of the fun things of Arduino. Essentially, they're easy to use, power them up and they'll light up. They can be annoying, because they have some kind of ...


5

First of all, may I say "Thank you" for helping your friend like that? I cannot think of a better way to use an Arduino than as a driver for a Braille display like you describe! As you know, Braille is a representation of characters into a "shape" that many systems don't recognise. Most people only encounter Braille when they press a button on an elevator ...


5

I presume you are trying to create a system that has one image stored, and want the image to be available without needing an SD card reader on the system. If the logic of your program is small enough to fit into about 18KB of flash memory, you can store one 230KB image in flash on a Mega. (230KB+18KB+8KB = 256KB = Mega flash size. 8KB is Mega bootloader ...


5

You have a common cathode display and all your cathodes are tied to ground through resistors. You have no way at all of separating out the different digits. You cannot directly drive such a display with a shift register like that - you need a more direct connection to the Arduino (it needs to be high speed) and rapidly switch each cathode on and off in ...


5

Because your program uses various String objects in several different sizes, there's a good chance that heap memory (in RAM) is getting fragmented to the point that String allocation begins to fail, or begins to allocate on top of stack variables. (Typically, heap and stack work toward each other, from opposite ends of memory that is free after static ...


5

SCK and SCL are the same thing. Serial ClocK Serial CLock They seem to be interchangeable. The fact you have SDA (Serial DAta) as opposed to separate SDI / SDO or MOSI / MISO pins means it's I2C. Wire it like you would any other I2C device.


5

Some displays have different characters above 128. It is best to make your own character. That is what @dannyf ment with "CGRAM". The custom characters are stored in CGRAM. There is no need to read the datasheet though, because there is a function in the Arduino LiquidCrystal library for it. Start here: Arduino CreateChar reference There are even websites ...


4

Your display is multiplexed, so you will need to monitor not only the segment lines but also the digit lines. First figure out if your display is "common anode" or "common cathode" as the logic in one case will be inverted from that of the other. For your test case, you can write the driving and reading arduinos to the display in the same way, but ...


4

It depends on what the enter key sends. It may be just CR (carriage return), LF (line feed), or both. You can check the ASCII table for the hex values for those characters. LF is 0x0A and CR is 0x0D. Those are the characters you're looking for, you can add a if for these cases in order to guard the call to lcd.print(dato): char dato= Serial1.read(); //...


4

If you're already preparing the next screen's-worth of data before you clear the screen, then double buffering won't help. In that case, the time taken to re-write the screen data is what causes the flicker, and the only way to improve it is to write the screen faster. If the software is to blame, it will be in screen.text(). If the software is already ...


4

You can chain as many shift registers as you want. Most commonly, these displays are multiplexed. Only one digit is lit at a time, cycling though all the digits fast enough, so the eye can't tell. This is however not very good practice for 28 digits, as the brightness will become 1/28th (though you could create groups of digits, and multiplex those groups ...


4

Seems you have I²C on the board you could possibly use an I²C LCD backpack, like from breakouts if you already have an LCD, this means you can have the RTC and display on the I²C bus and probably more things. Another option seems you mentioned LEDs, you could still use the I²C bus and use an I/O expander and hook LEDs up to that and address them over the I²...


4

The USB provides the one thing that is missing from your diagram there: the common ground. The GND pins of the two boards must be connected together. By using USB the USB becomes that connection. As soon as you use batteries there is no connection, so no communication happens.


4

Each character will be 6 bits (so let's use a byte to store it) and we'll use the following bit to LED mapping bit0 bit1 bit2 bit3 bit4 bit5 Now you just need an array of bytes where each byte signifies an ASCII character. Your code will get the letters to display and for each one will do something like this: byte BrailleBytes[] = {0x01, 0x05, 0xD, ...


4

I have somewhere in my stash a shield that enables an Arduino to overlay graphics on the screen. But it is kinda crude and low-res. What you're trying to achieve is definitely not for Arduino, it is way underpowered. You'd better look into doing this with something like a Raspberry Pi.


4

You cannot "add" character arrays like that. You may try to use a String object instead, as these do support the + operator as a way to concatenate them: String message = (String(celcius) + " deg Celcius, " + relativeHumidity + " relative humidity"); const char *c_message = message.c_str(); And then you use c_message in place of your test ...


4

Arduino Microprocessors are mostly single core devices and thus are unable to do more than one thing at a time. The trick is to write code efficiently so it looks like several things are happening at the same time but in reality they just happen very quickly. The LCD only needs to show time every second and displaying RPM every second should be enough so to ...


4

To scroll in the opposite direction, change this if statement: if( --x < len * -8 ) { x = LEDMATRIX_WIDTH; } to this: if( ++x > LEDMATRIX_WIDTH+len*8 ){ x = 0; } x (the start position of the text) is now incremented instead of decremented, until the whole text (consisting of len*8 pixels in x direction) is out of the display, where it then ...


3

How can I implement double buffering with an Arduino UNO? Full screen double buffering (aka off-screen bitmap) for an ST7735 (128 x 160 x 16 bit color) would require 40 Kbyte. With only 2K byte SRAM on the Arduino Uno double buffering is not possible. Some of the flickering is due to the Arduino core unoptimized SPI protocol and the graphics library. They ...


Only top voted, non community-wiki answers of a minimum length are eligible