HT1621 induvidual segment control

I cant find the files. i tried it on my Micro SD (Ima call SD from now) AND on my device itself (SSD from now) and it cant find a crumb

Open File โ†’ Preferences.

In the sketchbook directory should be a directory called libraries. In there should be a directory for HT1621 library with a src subdirectory where you should find the two files

If your username on the PC is kluuko, replace bugge by kluuko.

i know, its just 3:45 AM and im not gona do that now. (I know i need to sleep)

thanks i got the location.

it gives error:

No connection established. Last error: Error: connect ECONNREFUSED ::1:58894

Compilation error: No connection established. Last error: Error: connect ECONNREFUSED ::1:58894

And something abt linux?

i copied the code above:

I can't help you with that one; I think the IDE might try to connect to another process on your computer (which I think is normal) and can't for some reason.

What about Linux?

I got send to a website wich said some sh*t abt conecting amth to linux (I have windows)

Hi @kluuko

I'm going to ask you to provide the full verbose output from a compilation.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Open the sketch in Arduino IDE.
  2. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  3. Check the box next to "Show verbose output during: โ˜ compile" in the "Preferences" dialog.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Select Sketch > Verify/Compile from the Arduino IDE menus.
  6. Wait for the compilation to fail.
  7. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a reply here on this forum topic by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to publish the post.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a reply here on this forum topic by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:

    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

what if my micro SD (My projects, the thing itself and other stuff that woulb be verry anoying to lose) just doesnt work no more? the microSD is fine and the data is there but the slot on my laptop fails to catch it

While typing my previus mesage, it caght it so here it is ig

Using board 'uno' from platform in folder: C:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\OE104795\AppData\Local\arduino\sketches\DF68A3D2E881725DE8367BD853AE2245\sketch\Da_haked_librair.ino.cpp -o nul
Using cached library dependencies for file: C:\Users\OE104795\AppData\Local\arduino\sketches\DF68A3D2E881725DE8367BD853AE2245\sketch\HT1621.cpp
Generating function prototypes...
C:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\OE104795\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\OE104795\AppData\Local\arduino\sketches\DF68A3D2E881725DE8367BD853AE2245\sketch\Da_haked_librair.ino.cpp -o C:\Users\OE104795\AppData\Local\Temp\3874473031\sketch_merged.cpp
C:\Users\OE104795\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\OE104795\AppData\Local\Temp\3874473031\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\OE104795\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\OE104795\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\OE104795\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\OE104795\\AppData\\Local\\arduino\\sketches\\DF68A3D2E881725DE8367BD853AE2245\\sketch\\Da_haked_librair.ino.cpp" -o "C:\\Users\\OE104795\\AppData\\Local\\arduino\\sketches\\DF68A3D2E881725DE8367BD853AE2245\\sketch\\Da_haked_librair.ino.cpp.o"
Using previously compiled file: C:\Users\OE104795\AppData\Local\arduino\sketches\DF68A3D2E881725DE8367BD853AE2245\sketch\HT1621.cpp.o
D:\sicret\code\Arduino\Da_haked_librair\Da_haked_librair.ino: In function 'void setup()':
D:\sicret\code\Arduino\Da_haked_librair\Da_haked_librair.ino:12:23: error: expected primary-expression before ')' token
   lcd.begin(13, 12, 8,);
                       ^
exit status 1

Compilation error: expected primary-expression before ')' token```

@ptillisch just dont ask why i spelled it wrong, its on purpose. and here is the thing you asked

OK, this error is easy enough to solve. Line 12 of your sketch code is:

   lcd.begin(13, 12, 8,);

Note that there is a , after the 8 argument in that lcd.begin function call. This trailing comma is not allowed by the C++ compiler. So remove it:

   lcd.begin(13, 12, 8);

After fixing that bug, compile or upload you sketch once more. Hopefully everything will work as expected this time.

IT WORKS! (I did have to fight my microSD but it works). can someone put the solution in 1 mesage or am i gona do that (To mark it as solution)

This is the solution:

and here is to find the stuff:

Thanks @sterretje and @ptillisch for the solution :smile: thanks

You are welcome. I'm glad it is working now.

Regards, Per

it works but it doesnt work, what i asked here works but now my main code where the hasle was for just stoped working as intended.

void loop() {
  lcd.print(((millis() - 750)/1000) / 60, 1); // <--- here (the 1 decimal is always 0)
  lcd.setBatteryLevel((((millis() - 750) % 1500) /500) + 1);
  digitalWrite(3, HIGH);
  digitalWrite(3, LOW);
  delay(500);
}

so i need some help still.

You should post the full code or a representative example that shows the problem.

The code in post #6 (and #59) disabled the battery indicator, maybe that is the problem?

#include "HT1621.h"
#define LCD_CS_PIN 6
#define LCD_WR_PIN 7
#define LCD_DATA_PIN 8
#define DELAY_SINK 1000


HT1621 lcd;
void setup()
{
  lcd.begin(13, 12, 8);
  lcd.backlight();

  // sterretje: no battery level ??
  lcd.setBatteryLevel(0);
    // create a buffer for the display
  byte buffer[6];

  // clear the buffer
  for (byte cnt = 0; cnt < 6; cnt++)
  {
    buffer[cnt] = 0x00;
  }

  // switch everything on.
  for (byte cnt = 0; cnt < 6; cnt++)
  {
    buffer[cnt] = 0xFF;
  }
  lcd.print(buffer);
  delay(750);
  lcd.clear();
}

void loop() {
  lcd.print(((millis() - 750)/1000) / 60, 1);
  lcd.setBatteryLevel((((millis() - 750) % 1500) /500) + 1);
  digitalWrite(3, HIGH);
  digitalWrite(3, LOW);
  delay(500);
}

here it is

OK, I was mistaken about the disabling of the battery level; the code in post #6 only sets it to level 0.

What is that supposed to do?

Is this your comment? And your problem? If so, the print method that you're using is for variable of type double. However your calculation uses integers and the result will be an integer.

What happens if you change lcd.print(((millis() - 750)/1000) / 60, 1); to lcd.print(((millis() - 750)/1000) / 60.0, 1);?

It works. am i that stupid?