Ontopic Random Computer-Electronics Thread

Ran across this the other day.

Code:
struct float_decomp {
        union {
                struct {
                        unsigned int c:23, b:8, a:1;
                } f;
                float g;
        } data;
};

It's so gross, I love it.

The only thing that's really gross about it is portability, it requires unsigned int and float to both be 32 bits on the machine. If you pull shit like this, make sure you put some sizeof() checks so it won't compile if that's true instead of silently doing something wack.

Endianness shouldn't matter as both f and g will be read from memory as 32 bit numbers.

I do shit like this all the time. Embedded/DSP land has you doing all sorts of horrible shit.
 
  • Gravy
Reactions: fly and Jehannum
I'm sitting in a burger joint in Mississippi and looked at gmaps and see that there is a Bitcoin ATM next door.
The fuck is a bitcoin ATM?
It's an atm you can withdraw cash from your bc wallet at. I think they're popping up all over cause this one for profit atm network started carrying bc. Moneypass?
 
of all places to find one , too
Id think most folks in mississsippi were just barely sophisticated enough to use a normal ATM, let alone a bitcoin atm
I've seen them mostly in very poor areas. I kind of had the thought that they put them up where people will just feed in money into their accounts, like gambling.
 
So for the past month or so, whenever I download something on Chrome it bogs down so much of my PC that I literally can't do anything.
I've seen a lot of possibilities about what might be going on, but they all seem outdated.

Anyone have any ideas what might be going on?
 
So for the past month or so, whenever I download something on Chrome it bogs down so much of my PC that I literally can't do anything.
I've seen a lot of possibilities about what might be going on, but they all seem outdated.

Anyone have any ideas what might be going on?
You know what you have to do.
 
  • Gravy
Reactions: fly and Domon
So I picked up an ESP32 board to use with WLED. this one.

I've got WLED flashed on it. I've got it plugged correctly into a 1.5A PSU and the LEDs. But no LEDs will turn on. I've tried GPIO5 and 19. Hell, I even tried testing the LED data pin on every pin, and no lights came on. Also tried another LED strip. Anything I'm missing?
 
So I picked up an ESP32 board to use with WLED. this one.

I've got WLED flashed on it. I've got it plugged correctly into a 1.5A PSU and the LEDs. But no LEDs will turn on. I've tried GPIO5 and 19. Hell, I even tried testing the LED data pin on every pin, and no lights came on. Also tried another LED strip. Anything I'm missing?
you never got one of those dig quad controllers eh.

I actually never did that project, it ended up being way more expensive than I anticipated with all the parts together. The light strips + controller are cheap, but the mounting hardware and diffusers and crap really add up fast.
 
So I picked up an ESP32 board to use with WLED. this one.

I've got WLED flashed on it. I've got it plugged correctly into a 1.5A PSU and the LEDs. But no LEDs will turn on. I've tried GPIO5 and 19. Hell, I even tried testing the LED data pin on every pin, and no lights came on. Also tried another LED strip. Anything I'm missing?

What light strips?
 
you never got one of those dig quad controllers eh.

I actually never did that project, it ended up being way more expensive than I anticipated with all the parts together. The light strips + controller are cheap, but the mounting hardware and diffusers and crap really add up fast.
I did, but this is a different project. Using WS2812s.
 
No I dont.
Want to fix it fast? Clear the cache etc. Uninstall. Restart the computer. Remove all the old chrome temp files extensions and stuff. Reinstall.

You could also open task manager and see what it is doing when you downloading something but that's like work.
 
So I picked up an ESP32 board to use with WLED. this one.

I've got WLED flashed on it. I've got it plugged correctly into a 1.5A PSU and the LEDs. But no LEDs will turn on. I've tried GPIO5 and 19. Hell, I even tried testing the LED data pin on every pin, and no lights came on. Also tried another LED strip. Anything I'm missing?
The ESP32 has 3.3V outputs. According to its datasheet the WS2812B needs (0.7 * Vcc) @ 5V = 3.5V input on the data line to correctly read a '1'.

So yeah, as you've concluded already, you need a 3.3V -> 5V logic level shifter. Or alternatively, you could do something dumb/clever like this, which uses an extra LED as a level shifter:

 
The ESP32 has 3.3V outputs. According to its datasheet the WS2812B needs (0.7 * Vcc) @ 5V = 3.5V input on the data line to correctly read a '1'.

So yeah, as you've concluded already, you need a 3.3V -> 5V logic level shifter. Or alternatively, you could do something dumb/clever like this, which uses an extra LED as a level shifter:

I read through those articles. Your idea seems even easier, which is right up my alley. However, I don't see exactly what I need to buy. Hep?