Lazy 7 / One

19,385

230

76

Introduction: Lazy 7 / One

Lazy 7 / One

Features/Instructions are the same as on other projects based on the same sketch, here's another video (also linked from the sketch instructions in step 10).

Update - 2021/07/17

Sketch v7 available. I also recommend having a look at the notes about electronics when building one of my things! https://www.instructables.com/ClockSketch-V7-Part-...

Update - 2020/07/30
Splitted the electronics case STL and added another cover (B) including a hole. In case you want to build the 4 digit version this might be a better choice for wall mounting.


Update - 2020/06/02
Added draft of sketch v6 which can be compiled for nodeMCU/ESP8266. It's been added to Step 10. For details/information please have a look at Step 11 from my S7ripClock.

Just when I thought I was finally done with 7 segment modules.... someone came along having specific requirements to one. We ended up building some kind of grid, but it kept me thinking:

Is there an easy way to increase led count inside my 7 segment modules without scaling the model to insane sizes? Or using strips with 144 leds/m, which come with other problems? Yes.

After mixing some elements of my Lazy Grid Clock and 7 segment modules this is what I ended up with. Mainly I was working on another module but just had to build this smaller version with another question in mind:

Can the build be simplified even more compared to my other 7 segment clocks?

Yes, this can also be done. This clock is using a single strip of leds, a whopping 252 leds in total. There's just one long piece (4.2m) inside the frame parts and that's it. 8 leds inside each segment, 56 per digit.

Width: 40.7cm

Height: 14.8cm
Depth: 3.8cm

252 LEDs, 1 continuous strip (WS2812B, 60 leds/m, 4.2m)

Or 388 LEDs, if going for the 6 digits version (6.47m)...

Step 1: Info / Notes

This is more a "proof of concept". The idea behind the 7 segment modules was for advanced configurations where the modules will be mounted straight to boards and powered accordingly to make use of all those leds.

For everyday living room usage this should work with about 1.0A - 2A, you will have to adjust the default power limit inside the sketch according to wire gauge and power supply you're using.

While it will work right out of the box using 750mA (default limit inside the sketch) you'll barely notice any difference between the brightness settings and some color palettes might darken a bit when the dots between digits light up.

Be cautious: Lighting all leds up at full brightness/white and driving them at their rated max current (60mA) you'll end up facing a max consumption of 75.6 Watts (15.12A@5V).

If you plan to use this where high brightness is needed, make sure to use according materials. Running the clock at white and set to a power limit of 7.5A the parts got noticeably warm within 10 minutes of testing...

The sketch is based on my "S7ripClock", so head over there for some more detailed instructions about electronics, buttons and so on - electronics/schematics are exactly the same on this one, except there's only one strip of leds. ;)

S7ripClock - Basic Edition

Oh, and don't be shocked when looking at the amount of STL files. 6 of them is just for two types of diffusers... ;)

Edit:
Added a wall hook/mount part which can be put above the electronics case. Have a look at the 6 digits extension, there's a rendered picture where you can see two of them mounted (on the 6d version).

Step 2: Required Parts

Printed parts:

  • 1x L7One_Frame_A.STL
  • 1x L7One_Frame_B.STL
  • 1x L7One_Frame_C.STL
  • 1x L7One_Cover_A.STL
  • 1x L7One_Cover_B.STL
  • 1x L7One_Cover_C.STL
  • 4x L7One_Front_AC.STL
  • 1x L7One_Front_B.STL
  • 1x L7One_Elec_Case.STL
  • 1x L7One_Cable_Cover_A.STL
  • 1x L7One_Feet.STL

I suggest printing all of the above using black material.

The diffusers should be printed from clear material:

  • 28x L7One_Diffuser_AC_Type_1 or 2 (blank)
  • 2x L7One_Diffuser_B_Type_1 or 2 (blank)

There's also sets of all diffusers (30 pcs) for Type 1 and 2 in a single STL.

There's also an optional "spacer" to keep rtc/arduino seperated inside the electronics case, you might want to use this.

The biggest part (x/y) to print is 187.3mm x 147.6mm, so it should be printable on most printers.

Other parts you'll need to build the clock as shown are:

  • 252x WS2812B LEDs, 60pcs/meter strips, 5V, each led individually addressable, 10mm wide (IP65/67, coated/rubberized ones do not fit!)
  • 1x Arduino Nano or Pro Mini (atmega328, not 168. 5v, not 3.3v)
  • DS3231 RTC module (ZS-042, DS3231 for Pi or similar)
  • 2x 6x6mm push buttons (button height doesn't really matter, 3-6mm recommended)
  • Some wires (AWG 26 min.recommended)
  • 1x USB cable / USB Wall Charger (1A min.)
  • 12x M3 screws, 8mm-10mm (Note: Absolute max. screw length is 10.25mm! 8mm might be a bit short when connecting feet/wall hook)

You do need a working Arduino IDE to upload the sketch. Also you should know about the difference between compiling and uploading a sketch or installing the required libraries. If you're completely new to leds/arduino I recommend working through something like Adafruits Neopixel Guide first.

The sketch is using the FastLED library. So other LEDs can be used but this instructable will not include such modifications. Same goes for using an ESP8266 without logic level shifters and WS2812B.

For RTC communications the DS3232 library by JChristensen is used. So other models are supported (DS1307), I just didn't come across one without massive drift yet... ^^

Power usage/current is limited to 750mA inside the sketch. You may adjust this if needed and wiring/power supply can handle it.

Step 3: STL Files / Print Settings

Walls are multiples of 0.5mm. So I recommend using an extrusion width/line width of 0.5mm (using a 0.4mm nozzle myself).

I've printed everything at 0.25 layer height, good compromise between speed and looks.

No supports needed. Maximum overhang angle is 45°.

Step 4: Additional Information

Left this one blank in case I forgot something... ^^

Step 5: LED Frames / LED Strip

You'll need Frame_A, B and C to do this. While putting in the led strip you'll be looking at the clock from it's back. So Data In on the left side is what will be the right and 1st digit when looking at the finished clock.

It's important to align them in the correct order, otherwise you will run into trouble when reaching a certain point.

Frame_A is closed to the left side and the indents for clipping on the front parts are facing towards you / on the lower sides of the outer walls.

Frame_B is symmetrical and doesn't really care about it's orientation. It probably never heard of something like that.

Frame_C is closed on the right side, open to the center part on it's left. Here the indents for clipping on the front parts will show up/away from you.

Most led strips come at pieces of 50cm, soldered together to give up to 5 meters. So every 30 leds there will be one of those solder joints - which can't be bent by 90° or 180° as required on some spots. If you cut off the first one from a fresh strip you should have the first solder joint between led #29 and led #30. If that's the case, don't matter any more, all coming joints will fit inside without much trouble.

There will be 4 unused leds between every digit/dot, totalling to 16 (28 when using 6 digits). If you need those leds you will have to adjust the segArray inside the sketch and redefine SPACING_LEDS accordingly. Removing those 16 (28) leds will require a few dozen solder joints, so I think for the ease of build it's totally worth it leaving them in.

The led strip goes in on the left side of Frame_A. Make sure you're not mixing up Frame_A and Frame_C here, you'll have to remove the strip at one point if you do.

Route the strip along the outer walls through the upper 3 segments. Then do a 180° turn and return through the upper 3 segments, this time following the inner walls.

Afterwards route the wire along the upper wall from the center segment. Do exactly the same for the second digit.

When reaching the end of Frame_A put Frame_B in place and route the strip through the upper dot, following the outer walls.

Frame_C is like Frame_A - upper 3 segments outer/inner walls, center segment upper wall for both digits. After the center segment from the second digit inside Frame_C the strip needs to go to the lower right segment.

Now all of the above is repeated, just turned 180° around. So now it's the lower 3 segments, outside walls first, inside walls after that, ending at the lower walls from the center segments/lower dot.

Cut off the strip after the last/4th led inside the center segment on the left most digit.

I recommend testing the leds now...

Note: When I was taking the pictures I was using an old center module which had 16 leds. This was quite irritating as the size was the same as a regular "1", so I modified the center dots to be a bit smaller (12 leds). You can see the current version (12 leds) inside the gallery and later pictures/videos will show it.

Step 6: Testing the LEDs

The test sketch is limited to 500mA, so you can run it safely when powering an Arduino by USB and simply connect the LEDs to +5V / GND. Data In goes to Pin 6.

The test sketch will show up all 252 leds like can be seen in the video. Each led will be lit up here, so don't pay too much attention of light leaking out from the later unused leds between digits/dots.

Afterwards there's a demonstration of displaying 0-9 on each position and counting from 0-99 on the left/right side.

If you're planning to use the HH:MM display in your own projects you're ready to go. All you need is inside the test sketch, including segment and digit definitions and routines to display them easily.

If you'd like to build the clock as shown, continue to the next step...

Note:

Test sketch v1 has been replaced with v2. This one can be compiled for either Arduino or nodeMCU/ESP8266 and can be used for 4 or 6 digits.

Step 7: Front / Diffusers

Simply put in the diffusers of your choice inside the front parts and clip them onto the digits/dots. Watch for orientation on the digits, two of them (MM) have the indents for the snap fits on the lower walls, two of them (HH) on the upper ones. The front parts are symmetrical, simply rotate them by 180°.

While capturing the real impression of leds is quite tricky I tried to add a comparison of Type A/B. Type B offers almost some kind of fresnel effect when moving your head, starting from a distance of about 4m the difference between A/B is barely visible.

Step 8: Assembly

Additionally to the 3 wires from the test you'll need to add power to the other end of the strip. Depending on your choice of power supply/cable you'll need to route the wire through the hole inside the cover of Frame_A, like I did when connecting the USB wire.

After doing so put on all the covers on the led frames.

Put the electronics case on the back and put in all 8 screws. I recommend starting with the ones connecting the case to the center module. There's a bit of tolerances, so try to push the modules together, keeping them straight while tightening the screws.

If mounting feet/wall hook I'd suggest doing so after aligning everything and tightening the screws. If only the two screws are removed to mount feet/wall hook alignment should be kept, but aligning everything with the feet in place is a bit tedious.

All screw holes are 2.85mm in diameter. They only reach 7.5mm inside the frame parts, so don't use anything longer than 10mm when everything is in place. Top 1.5mm of the screw mounts are 3.25mm to avoid putting the screw in at an angle, this helps keeping it "straight down".

Mount the base for the cable cover. It's only using one screw and the other side is held in place by the electronics case. Route wires to the inside from the electronics case and put on the cable cover. You'll need to slide it on at a an angle from the side and then push it down after reaching the case.

No white paper on those pictures, when taking the other ones the cable cover didn't exist yet... neither did the spacer between rtc and arduino which can be seen in the last picture. And the wall hook still doesn't... ^^

Put screw #10 inside the outer most right hole to fix the cover.

Step 9: Electronics

The case should fit various combinations of Arduino Pro/Nano and RTCs (DS3231 for Pi, DS1307, DS3231). Or other microcontrollers if you intend to.

Schematics and connections are exactly the same as on my S7ripClock, so for details that's a good place to have a look at.

Depending on wanted brightness levels and power supply you might want to add capacitors near the led strip and the arduino.

Step 10: Lazy 7 / One - Arduino Clock Sketch

The software sketch is at version 6. That's because it is very close to the one I've been using for some of my other projects, so I didn't want to confuse this because of the redesigned "hardware" around it...

Basic usage:

  • Button A: Select brightness
  • Button A (long press): Switch color mode (per digit/per led)
  • Button B: Select color palette
  • Button B (long press): Switch 12h / 24h mode
  • Button A + B: Enter setup

While in Setup: ButtonB -> Increase +1, ButtonA -> Accept/Next

Or simply watch the video, usage instructions start at around 01:38.

After uploading the sketch (and possibly adjusting the power limit on top of it) you're done and good to go. In case of any problems set your serial console to 74880 baud and have a look at it to see what's going on. If the clock enters setup straight away and shows nothing it's likely the buttons are shortened/connected wrong.

For additional information you might want to have a look at my other designs, some of them (tiny edition) offer german instructions as well.

v6 offers support for nodeMCU/ESP8266 and WiFi/ntp, if desired. It's one sketch for 4 or 6 digits on either Arduino or nodeMCU (using rtc or ntp).

v7 available here: https://www.instructables.com/ClockSketch-V7-Part-...

Step 11: (Optional) 6 Digits - Prerequisites

If you'd like to add another two digits and a center module to display HH:MM:SS, here's how to do it.

While this does work, you will need another sketch. I had to modify the original one because of various reasons. Many variables had to be changed because now there's more than 255 leds. Also the sketch is now running pretty low on memory (88% with debug enabled). None of this prevents this from being used - but if you're planning to do modifications you may need to optimize memory usage (or use something else than an Arduino with 2048 bytes RAM, where's already 1164 used for the led array (388 leds x 3 bytes (r/g/b)).

Note:

The RAM situation doesn't change - but starting from v6 there is a single sketch for 4/6 digits, so please use the one from the step above. Also v6 can be compiled for nodeMCU/ESP8266 to use WiFi/ntp, if desired. The old seperate sketch has been removed. Uncomment "#define use6D" inside sketch to use 6 digits.

Oh... and when using 6 digits I recommend running this at least with 1.5A, otherwise you'll notice all digits darkening while the center dots light up (24 leds) even on the lowest brightness setting.

For 6 digits the following things are required:

STLs from this section:

  • 1x L7One_Frame_D.STL
  • 1x L7One_Cover_D.STL
  • 1x L7One_Diffs_D.STL (only Type 1 provided, 14x AC and 2x B ones)
  • 1x L7One_Connector.STL

STLs from the original files section above:

  • 1x L7One_Frame_B.STL
  • 1x L7One_Front_B.STL
  • 1x L7One_Cover_B.STL
  • 2x L7One_Front_AC.STL

Other:

  • 136x WS2812B LEDs
  • 8x M3 screws

LED Strip(s)

Frame_D doesn't care about orientation, just like Frame_B. So you only have to watch this when putting on the front parts, so the clips match up.

Start on the left upper segment, as before. But this time place the first led inside the frame before the first segment starts. Route the strip through the upper 3 segments as before, leaving the first digit after going along the upper wall from the center module.

Repeat this for the second digit and route the strip through the upper dot from the additional center module when reaching the end. Cut the strip after that as can be seen in the pictures.

Now simply rotate everything by 180° and start with Data In on the center part. Then along the first 3 upper segments from the first digit and so on...

When you're done you should have Frame_D with one strip running through the upper half and another one through the lower half. The upper one starting with Data In on the left side, the lower one starting on the right side. Put in the diffusers in the front parts and clip them on.

Done with the preparations, now let's connect everything...

Step 12: (Optional) 6 Digits - Assembly

Remove everything from the clock until you can safely remove the cover from the right (seen from the back) module and from the center module.

Note: I recommend removing the coin cell from the RTC while doing this!

Now cut the led strip right where it's leaving the center module, before entering the right module.

Move the right module further away until you can fit the additional Frame_D and center module between.

Solder all eight loose ends together and put everything back together (now may be a good time to upload the 6 digits compatible sketch from the previous step).

The plate holding the modules on the right side in place is different from the one I've uploaded. There's some small walls now to support the foot, which I've moved from the electronics case to the right side.

3D Printed Contest

Participated in the
3D Printed Contest

4 People Made This Project!

Recommendations

  • Plywood Contest

    Plywood Contest
  • Metal Contest

    Metal Contest
  • Microcontroller Contest

    Microcontroller Contest

76 Comments

0
a335853642a
a335853642a

2 months ago

你好,
我现在做的是这个 Lazy-7-One 时钟
这里有几个问题要请教你一下
图中的4个LED怎么在程序中取消,这样可以减少浪费

微信图片_20220730141308.jpg微信图片_20220730141741.jpg
0
avr2012
avr2012

1 year ago

Hello. How to increase the brightness of the LEDs? I set "byte brightnessLevels[3] {90, 150, 255}; " But the glow in sunlight is still not enough

0
parallyze
parallyze

Reply 1 year ago

Uhm..

"But the glow in sunlight is still not enough"

Yes. You simply can't win a fight with direct sunlight using WS2812 leds... leds for lighting nowadays come with an efficency of around ~120-140 lumens/watt. WS2812B /SMD5050 are nowhere close to that, my guess would be way below 40lm/w. 8 leds in each segment at a max of 60mA = 2.4w. That's way below 100lm maximum output...

What other steps did you do to achieve maximum brightness?

Things like using primary colors will also drastically lower the output...

Edit:
Another thing to make sure is the selection of proper wiring/materials. As written in the Instructable this thing can get pretty warm if driven at high currents.

Here's one running for < 15 minutes and power limit set to 6 amps. On the inside this one is already reaching temperatures high enough to soften PLA...

l7o_6amps.JPG
0
avr2012
avr2012

Reply 1 year ago

I noticed that with (avgLDR = minBrightness;) after a certain time the clock freezes. But with (avgLDR = brightness;) the clock runs well

1
parallyze
parallyze

Reply 1 year ago

I noticed that with (avgLDR = minBrightness;) after a certain time the clock freezes. But with (avgLDR = brightness;) the clock runs well

I noticed you're not interested in solving the problem you initially commented on.

And no, the clock does not freeze with "(avgLDR = minBrightness;)".

There's two checks involving this, one making sure avgLDR is never below minBrightness, the other one switching to minBrightness if a lowerLimitLDR is defined. So maybe you should, once again, try to properly explain your problem.

I am pretty sure somebody would have noticed the clock locking up each night when using an LDR...

So far the only ones I've come across who had problems with ldr values have been using ESP8266 boards but did connect the ldr to +5v. This will lead to overflows and was visible in their sketches - all of them had factorLDR set to values >= 10...

If you're seriously interested in solving any of this, feel free to post some information. Microcontroller used, wiring, sketch version, power supply, config changes and serial output(!)... are you using the 4 or 6 digit version of this clock?

Right now putting more effort into this seems like a major waste of time, so far you didn't post any useful info or answer anything...


0
avr2012
avr2012

Reply 1 year ago

Power supply 5 volts, 2.5 amperes. Arduino nano. Four digits.
When "minBrightness" is set to less than 90, and when this condition is triggered, the watch falls asleep after a while.

0
parallyze
parallyze

Reply 1 year ago

I have one set up and running using default values:

upperLimitLDR = 180;
lowerLimitLDR = 50;
minBrightness = 30;

It's been running now for roughly 90 minutes:

RTC date is : 2021-9-15 (Y/M/D)
autoDST time is: 16:45:40
-snip-
RTC date is : 2021-9-15 (Y/M/D)
autoDST time is: 18:13:20

Values <= 50 are lowered to 30, values < 30 are raised to 30. Both checks doing their job:
readLDR(): avgLDR value: 49 - adjusted to: 30

readLDR(): avgLDR value: 10 - adjusted to: 30


Selected brightness level was 90, so avgLDR > 90 was also properly capped at 90:

readLDR(): avgLDR value: 151 - adjusted to: 90


What do you mean by saying

"the watch falls asleep after a while."

There is no "sleep mode". So does it really freeze, did you check on the serial monitor if it is still running?

Your changes to the avgLDR checks might have introduced a loop which simply drops brightness below 0 or raises it above 255, so there's an overflow. So the clock is still running, but you're not seeing anything.

If you're running v7 of the sketch there should be an update to the serial monitor every 20 seconds, so it's very easy to check if the clock is running or if the leds don't show anything.


Edit:
Tried using the values from your first post for brightness levels, does also work as expected, values >= 180 are set to max (255 with this setting selected), <= 50 is capped at 30:

readLDR(): avgLDR value: 182 - adjusted to: 255

readLDR(): avgLDR value: 24 - adjusted to: 30


0
avr2012
avr2012

Reply 1 year ago

Here are the settings at which, at the lowest brightness (byte minBrightness = 30;), the LED indication freezes after a while. If you turn off the power and then turn it on again, the time will be displayed correctly and the LEDs will light up correctly, but after a while they will freeze again. It is also observed, at the lowest brightness (byte minBrightness = 30;), sometimes a rare blinking of the clock. I tried your different firmware and version 6 and version 7.
Settings:
byte brightness = 255;
byte brightnessLevels [3] {150, 160, 255};
byte brightnessAuto = 1;
byte upperLimitLDR = 150;
byte lowerLimitLDR = 50;
byte minBrightness = 30;
.................................................. ...
void readLDR () {updateDisplay ();
static byte runCounter = 1;
static int tmp = 0;
byte readOut = map (analogRead (pinLDR), 0, 1023, 0, 250);
tmp + = readOut;
if (runCounter == 5) {
avgLDR = (tmp / 5) * factorLDR;
tmp = 0; runCounter = 0;
if (dbg && dbgLDR) {Serial.print (F ("avgLDR value:")); Serial.print (avgLDR); }
avgLDR = max (avgLDR, int (minBrightness)); avgLDR = min (avgLDR, int (brightness));
if (avgLDR> brightness) avgLDR = brightness;
if ( avgLDR >= upperLimitLDR && avgLDR < brightness ) avgLDR = brightness;
if ( avgLDR <= lowerLimitLDR ) avgLDR = minBrightness;
if ( avgLDR < minBrightness ) avgLDR = minBrightness;
if (avgLDR if (dbg && dbgLDR) {Serial.print (F ("- adjusted to:")); Serial.println (avgLDR); }
}
runCounter ++;
}


In the range of LED brightness from 255 to 150, everything works well without freezing

My wiring diagram, for the convenience of wiring:

222.jpg
0
parallyze
parallyze

Reply 1 year ago

That wiring diagram looks like there's been some badly made changes. Also it's incomplete...

Are you really running up to 2.5amps passing through the rtc module?!

Did you check the charging circuit on the rtc, are you using a ZS-042 like in the schematics?

Many of this is covered in my Instructables. But as far as I can tell you didn't really have a closer look at them. Also I'm very convinced we're not talking about one of my designs - more likely some led strips glued to some wood. There's really no other reasons why one would refuse posting the serial output and/or detailed information.

0
avr2012
avr2012

Reply 1 year ago

The RTC charging circuit is open. I removed the resistor.
My scheme is the same as yours. Only the connections are different. And this is your project
Yes, I use ZS-042 as in the circuit

0
parallyze
parallyze

Reply 1 year ago

Really fascinating. Instead of finally posting the output on the serial monitor to check the reported ldr values...

My scheme is the same as yours. Only the connections are different.
"I've seen that movie. It just had a different title and the story was different, but it was a movie!"

So it's not my schematics. I wouldn't recommend powering everything through the rtc because I wouldn't bet on the copper traces on the pcb being dimensioned for loads > 10 watts...

And this is your project
No, see above. And even if you were working on a L7/O you might want to explain why and where you differ from the instructions in the first place... but somehow each time you're asked to have a look at the serial monitor you come up with something completely different. Why do you refuse to have a look at the values reported in the serial monitor?!

I've stated multiple times I had a L7/O up and running, you could have simply uploaded the modified sketch somewhere... but for some reasons you didn't want this, too...




0
avr2012
avr2012

Reply 1 year ago

And so on in order.
I apologize in advance if I annoy you with my actions. But English is not my favorite language.
As for the program, when transferring it from the Arduino shell, your comments mistakenly remained in the lines, which I tried to delete, but apparently not entirely. As for the monitor, I'm trying to start it, but there are numbers in the length of the line and a lot of them in the line of questions (apparently there is no necessary font installed on my computer).
Presently. I soldered the circuit like yours. But at minimum brightness, at night, freezing still occurs.
Freezes stop only when the minimum brightness is not less than 90.
I attach files with settings.

22-2.jpg22-1.jpg
0
parallyze
parallyze

Reply 1 year ago

But English is not my favorite language.
Deutsch könnte ich noch anbieten... (but german probably isn't much easier to translate?)

As for the monitor, I'm trying to start it, but there are numbers in the length of the line and a lot of them in the line of questions (apparently there is no necessary font installed on my computer).
Is serial speed set correctly? (see picture)

Why version 6 and not version 7?

Why do you need to change code down there? Only values on top should be changed.

Here's a video of what v6 works like with and without ldr, using default values, the ones from your screenshot, also minBrightness set to 30 in the last test.

http://www.aunix.de/tmp/l7o_v6_ldr-test.mp4

Absolutely no need to change anything inside the sketch further down, especially not mixing v6/v7.

serial_baud_rate.JPG
0
avr2012
avr2012

Reply 1 year ago

I changed the FastLED library from version 3.001 to 3.004 and everything started working as it should.
In firmware version 6, I like the automatic change in the color of numbers more than in version 7.

0
parallyze
parallyze

Reply 1 year ago

Note to others who might read this:
3.001 and 3.004 indicate the 3.1.x / 3.4.x branches inside the library manager. 3.1.6 is what I was using back in 2018 when adding ldr support to the sketch.
If 3.1.0 was used then this would have already shown a problem when compiling because setting the power limits using volts+milliamps wasn't supported back then.

Have a L7/O set up and running using a very old version (3.1.3 from 2016) right now, no problems at all using the unmodified sketch from this Instructable (which, according to him, would suffer the freeze problem using a default minBrightness of 20). It's been running for hours now @20....

Anyways: I highly doubt all this has anything to do with one of my projects. In his screenshots there's some other changes he didn't mention. So after days of spending time on this it's still unclear if there was a freeze at all or the unexplained modifications caused this. There's still absolutely nothing to back up anything he said nor any explanation why he's not using the unmodified sketch to test things...

Judge for yourself...

0
parallyze
parallyze

Reply 1 year ago

I tried your different firmware and version 6 and version 7.
Settings:
byte brightness = 255;
byte brightnessLevels [3] {150, 160, 255};
byte brightnessAuto = 1;
byte upperLimitLDR = 150;
byte lowerLimitLDR = 50;
byte minBrightness = 30;
.................................................. ...
void readLDR () {updateDisplay ();
static byte runCounter = 1;
static int tmp = 0;
byte readOut = map (analogRead (pinLDR), 0, 1023, 0, 250);
tmp + = readOut;
if (runCounter == 5) {
avgLDR = (tmp / 5) * factorLDR;
tmp = 0; runCounter = 0;
if (dbg && dbgLDR) {Serial.print (F ("avgLDR value:")); Serial.print (avgLDR); }
avgLDR = max (avgLDR, int (minBrightness)); avgLDR = min (avgLDR, int (brightness));
if (avgLDR> brightness) avgLDR = brightness;
if ( avgLDR >= upperLimitLDR && avgLDR < brightness ) avgLDR = brightness;
if ( avgLDR <= lowerLimitLDR ) avgLDR = minBrightness;
if ( avgLDR < minBrightness ) avgLDR = minBrightness;
if (avgLDR if (dbg && dbgLDR) {Serial.print (F ("- adjusted to:")); Serial.println (avgLDR); }
}
runCounter ++;
}

Apart from you not reacting to my comment about this:
void readLDR () {updateDisplay ();
Also there's other modifications, this is not taken from v6 or v7 directly.

And this is your project
So why are you using modified code instead of the provided sketches?

0
avr2012
avr2012

Reply 1 year ago

And so on in order.
I apologize in advance if I annoy you with my actions. But English is not my favorite language.
As for the program, when transferring it from the Arduino shell, your comments mistakenly remained in the lines, which I tried to delete, but apparently not entirely. As for the monitor, I'm trying to start it, but there are numbers in the length of the line and a lot of them in the line of questions (apparently there is no necessary font installed on my computer).
Presently. I soldered the circuit like yours. But at minimum brightness, at night, freezing still occurs.
Freezes stop only when the minimum brightness is not less than 90.
I attach files with settings.

0
parallyze
parallyze

Reply 1 year ago

You already posted exactly the same text twice 6 hours ago. 3 hours ago I replied to one of those.. and now you post the same thing a 3rd time?

0
parallyze
parallyze

Reply 1 year ago

Do you even read what I'm writing?!?

What is the output on the serial monitor?!

This is the FIRST STEP in troubleshooting and 3 messages later you still don't care... even when asked for multiple times. Again and again.

Stop asking people for help if you're not willing to answer their questions and/or provide information (or your modified sketch so others could simply upload and check).

Instead you keep posting useless modified snippets of code..

void readLDR () {updateDisplay ();

This doesn't make any sense and it's not from the v6 or v7 sketch available for L7/O.

Think I've wasted enough time on this thread. As others can confirm this is not a problem with the sketch. And the ONLY PERSON who can deliver information is YOU. But you don't.

0
avr2012
avr2012

Reply 1 year ago

And so on in order.
I apologize in advance if I annoy you with my actions. But English is not my favorite language.
As for the program, when transferring it from the Arduino shell, your comments mistakenly remained in the lines, which I tried to delete, but apparently not entirely. As for the monitor, I'm trying to start it, but there are numbers in the length of the line and a lot of them in the line of questions (apparently there is no necessary font installed on my computer).
Presently. I soldered the circuit like yours. But at minimum brightness, at night, freezing still occurs.
Freezes stop only when the minimum brightness is not less than 90.
I attach files with settings.

22-2.jpg22-1.jpg