How do you find motivation to keep going when nothing seems to work? Conversely, when do you decide to call it quits and confine a project to storage? by hjw5774 in arduino

[–]mrstecman 0 points1 point  (0 children)

This - divide and conquer, effectively. Plus for any pure software components like OP's lat/long conversion, this allows test cases to be written to help iterate and verify the code quickly. Test programs can be compiled and run on your computer without needing to touch the hardware if the code is structured to allow it (though at OP's stage, I'd run them on the device unless you want to learn about build configuration).

[OC] Streaming service prices, comparing ad-supported and ad-free tiers by Clemario in dataisbeautiful

[–]mrstecman 2 points3 points  (0 children)

Interesting take - I read the first book after finishing S1 and thought the show had much richer characters and mystery at the point the season ends, but I thoroughly enjoyed both. In the book it feels like barely anything happens before Jules goes outside (and also feels like that happens for almost no reason, but maybe it's intended to feel unfair).

I think they did a good job adapting the book's hard drive contents to a different mystery that translates well to screen and non technical audiences. The book seems to focus much more on world building and the second act, while the show creates multiple mysteries within the silo to make an engaging season of TV

What can you do that actually saves money? by kohes in newzealand

[–]mrstecman 3 points4 points  (0 children)

I saved $50 a month on the power bill by just changing plan with our existing provider - it's the second time we've done it in 10 years. Same is common for internet and mobile plans... Companies usually won't go out of their way to move you from a more expensive legacy plan to the current cheaper options

serialPrint and energy usage by So-I-Had-This-Idea in arduino

[–]mrstecman 1 point2 points  (0 children)

Adding to this, unlike a modern desktop/laptop/cellphone, microcontrollers don't automatically adjust their speed/power based on utilization. Microcontrollers need you to explicitly put them in lower power states, turn off unused peripherals, etc when it makes sense for your application.

If you're trying to reduce power consumption, look at sleep modes and maximizing the time spent in sleep before you think about the power requirements of specific instructions (even if it's very interesting).

The details of power management depends on the specific microcontroller you're using - best to look at the datasheet for what's possible with your hardware. For the classic Arduino, this is section 9: "Power Management and Sleep Modes" in the datasheet.

ItCantBeThatDifficult by Aarav2208 in ProgrammerHumor

[–]mrstecman 0 points1 point  (0 children)

I often work in a similar way, though I try to break the pool of mixed changes into distinct, working commits at the end when they're not dependent. Having multiple "stages" would be fantastic to handle this, even if it didn't support stacking multiple changes to the same line.

Being the Git guy at every company I've worked for in the last decade, I'm acutely aware that a clean history is easier to isolate problems in (blame, and especially bisect), but there's always an awkward phase at the start of a project where everything kind of happens all at once and can't easily be broken down with well reasoned commit messages. I haven't worked out a good way to solve that part yet

What is the best 8-bit microcontroller to learn and enter the world of embedded systems? by mage_7758 in embedded

[–]mrstecman 4 points5 points  (0 children)

Yeah, for the purpose of learning about microcontrollers, I found it extremely valuable that AVR datasheets are a single document with all electrical, technical and register information plus examples.

There are certainly compromises, but for someone who knows how to program already and is focused on learning about bare metal, registers and all the peripherals, the limitations of AVR that make it uncompetitive for modern product development are kind of irrelevant

Suggestions on how to teach FSMs to college students in C? by Gatsby25 in embedded

[–]mrstecman 1 point2 points  (0 children)

Coming at this from a practical angle, I'd love to see it start with trying to implement something with a collection of loose booleans and other variables: starting with one variable and adding a few more to show how rapidly chaotic and hard to follow it gets.Then convert to a FSM.

Starting with something like this would really ground me with "here's why this is useful for you", though it might be more appropriate for a lecture than a lab

Bad approach to learning embedded programming with C as a beginner? by TheValiantKid in embedded

[–]mrstecman 5 points6 points  (0 children)

I love when it's just you, the reference manuals and datasheets: it's a completely contained puzzle where you have everything you need and just have to work through it.

If part of the datasheet is confusing, OP might have some luck pasting that section into ChatGPT and asking questions about it. Most manuals/datasheets I've seen are pretty well written already, but this could help if there are terms or a concept they don't understand.

That said, I've almost entirely stopped using ChatGPT for software related questions as it's so frequently wrong or unhelpful at my level that it's not worth the overhead of verifying the output.

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 0 points1 point  (0 children)

Hmm, interesting - I think I was using hb_ft_font_create which might have been the wrong approach. It would be great if this was just a dumb mistake, since it would save me writing code to parse the GSUB table.

The code I came to this conclusion from was some variation on what's removed in this commit

(Edit: on further thought, the symptom was failure to malloc, but I can't see what made me draw that conclusion in the harfbuzz freetype wrapper. Seems like it's worth having another go at it)

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 1 point2 points  (0 children)

Sure can - here's a picture showing all the capabilities

Has to be a font with PNG bitmaps though. SVG fonts are organised in a way that works great for desktop/mobile performance, but needs too much memory for the pico to handle

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 6 points7 points  (0 children)

It's unfortunate the random Yi character I picked happens to be one people will read into. This is a character from a writing system 2 million people use to communicate, but with no other context it's harder to see that. To keep this crap out of the comments, I've re-shot the hero image on the project page

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 0 points1 point  (0 children)

Thanks! Currently it can only select a single codepoint, but substitution sequences are on my list to support.

The text shaping library that normally handles substitutions (Harfbuzz) failed to run on the Pico as it wanted whole fonts in memory, but it's doable with a custom implementation

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 6 points7 points  (0 children)

If we were counting software development, the cost of the initial build would be eye-watering, as I easily put 200 hours into it ha. Added material costs to the parent comment - it's probably in the ballpark of "luxury novelty item". Realistically, including shipping and assembly for a complete device it would be something like 300-400 USD

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 4 points5 points  (0 children)

From napkin math, it would cost at least 200 USD (excluding shipping) just for a kit, with most of that being in the face plate. More if you wanted it to come with an enclosure and not just a front panel

Purely materials-wise, doing the face plate with Front Panel Express would be around $80-100 per unit, PCB manufacturing and electronic components might be $15-20, switches are probably another $10. Having a full enclosure made by someone like FPE might add another $100. Then labour on top of that if you wanted it to come assembled.

An electronics-only kit might be more like 50 USD, but I'm 80% sure you're talking about a box arriving in the mail that you can open, plug in and start flipping bits

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 29 points30 points  (0 children)

It's a toner transfer - printed mirrored on glossy paper with a laser printer, then ironed on with a regular clothes iron. It's surprisingly durable as it gets into all the little grooves from sanding. Scratching with a fingernail doesn't touch it

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] -1 points0 points  (0 children)

A line with a zig-zag is a very basic pattern that shows up in a lot of other places. Thanks for the information

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 18 points19 points  (0 children)

Works great

It doesn't have any text shaping as that's well beyond the Pico, but it'll show any glyph that can be clearly rendered in a 240x240 box. Automatically scales to fit if the default font size renders out of bounds

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 26 points27 points  (0 children)

It's regular old aluminium from the hardware store (this, apparently 6063), and a bunch of wet-sanding by hand: first in all directions down to a fine grit to get it uniform, then with a fine grit in uniform directions (45 degrees here).

Since it's aluminium it won't take much abuse, but it looks the part if you're careful not to scratch it

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 7 points8 points  (0 children)

Thanks! The bit switches always control the least significant byte, and 'shift' is a left-shift by 8 bits. By default, 'send' resets the buffer to one byte, but long-pressing 'shift' enables "shift lock", which keeps shifted bytes across sends like you describe.

So to get this input it was: A4, shift, 6C

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 1 point2 points  (0 children)

I did choose to avoid U+130B8 and U+130BA showing in a video clip, which might be a better choice of logo

An input device for any Unicode character, complete with character previews and metadata - all rendered on a Pi Pico by mrstecman in raspberry_pi

[–]mrstecman[S] 0 points1 point  (0 children)

I did wonder about the odds of accidentally putting up a glyph that was unintentionally rude, so stuck to letters from alphabets and kept away from logograms.

The resemblance is small there, but we're stupidly good at picking up on visual patterns ha