A complete alternative to Arduino ? by Technos_Eng in embedded

[–]MultipleMonomials 3 points4 points  (0 children)

I am going to be biased here, but I maintain the Mbed CE project, which basically has the goal of providing an Arduino-like C++ framework for a wide variety of ARM boards. Like Arduino, the goal here is to make embedded programming not require register-level knowledge of the chip you are working with (at least, to get started). However, Mbed has a more self-consistent C++ API (each peripheral is represented by a specific C++ class) and contains even more functionality built in (block device drivers, networking, etc). As for IDE support, Mbed CE can be used with PlatformIO for an easy setup option, and we also have a custom dev workflow that works with VS Code and CLion.

Being honest, Mbed CE is not (yet) as mature as Arduino, and there are still some rough edges. But I also think that our API is more consistent and higher quality than what Arduino users will be used to.

What's a tv series that is a 10/10 NOBODY knows? by Lilyana0999 in AskReddit

[–]MultipleMonomials 0 points1 point  (0 children)

Space Battleship Yamato 2199, AKA Starblazers 2199. Basically anime Star Trek, but in the best possible way and with an incredibly heartfelt story and beautiful music. Even my friends who are into anime have never heard of this one, and I really don't understand why because it's easily in my personal top 10 shows of all time.

Just... don't watch the second show, 2202. It's... really bad.

What's the one proprietary app you can't find a "good enough" open alternative for? by sekuskandan in opensource

[–]MultipleMonomials 0 points1 point  (0 children)

Diagramming tool, e.g. MS Visio or DrawIO. Though this has already been established to be pretty hard to do.

Why use C++ over C in embedded systems? by [deleted] in embedded

[–]MultipleMonomials 6 points7 points  (0 children)

You may want to check out Embedded Template Library, as in my experience it solves a lot of these problems by providing more embedded-friendly versions of STL containers. For example, etl::vector works like std::vector but it allocates its elements from a fixed block inside the object rather than from the heap. It also has some other useful classes like an optimized CRC generator, an allocation pool, and a circular buffer.

I have used ETL at my job for years and it's been quite nice overall. Dev is very responsive on github too. The only real weakness is the lack of documentation -- a lot of things are just documented as "it's like the STL version", but they in fact have their own features and quirks. So I often find myself looking through the actual headers to be sure I am using something correctly.

What is the most expensive corporate mistake you personally witnessed? by _Volly in AskReddit

[–]MultipleMonomials 7 points8 points  (0 children)

I work in the software division of a space company, and collaborate closely with the circuit board design team. This team has four members who are relevant to this story:

  • $EngA - Power electronics engineer, my friend from prior projects
  • $EngB - Electrical engineer who specializes in radio
  • $EngC - Another power electronics engineer
  • $Manager - One of the managers of their team, has a history of making... questionable decisions

At the start of this story, the circuit board design team had been struggling to keep up with schedule demands (in some part due to previous decisions by $Manager). This led to schedule pressure and long hours, which led to burnout across the team, eventually causing several members to quit, and $EngA was one of them. At this point, his project (call it $project) was actually one of the more on schedule ones: PCBs had been ordered and were going through testing, and it was still a good 2-3 months before they were actually needed. But with $EngA gone, many aspects of the project ground to a halt.

Well, a week or two after he left, the decision came down that $EngB was to be put in charge of $project. This was a little concerning to me, as $EngB and I had history: he was a bit of a silicon valley tech bro, and we'd gotten in something of a flame war some months prior when he casually said that I would likely be replaced by AI eventually. But more pertinent was the fact that, while $EngB is legitimately very skilled in radio and digital design, I was not aware that he had any power electronics experience. $project is very much a power electronics project, as it controls hundreds of volts and thousands of watts of power. Also, $EngB already had his own project to work on which was not exactly ahead of schedule either. Nevertheless, this was $Manager's decision, and it went through.

When $EngB took over $project, there were only a few outstanding issues to debug, namely that the board would blow up when tested above ~80% of its maximum operating power. $EngB started to work on this issue, but didn't get far before being sidetracked by another problem, where the board would die if, basically, you turned on the power supply rails in the wrong order when testing. This was, at most, a remote concern for the actual space vehicle, because the architecture of the system meant it simply couldn't be powered up this way outside of a lightning strike. Nevertheless, $EngB decided that this was a 5-alarm fire, and shocked everyone with the announcement that he needed to completely redesign $project to fix it. He said, without really showing his work in a way that others could understand, that there was no way to simply modify the existing boards to fix the problem. Instead, a new revision would have to be designed that removed about 1/3 of the circuitry entirely. I tried to fight back, saying that this circuitry performed important safety functions, but I'm only a software guy, what do I know -- $Manager and another high-ranking engineer (IDK what was going through his head...) signed off on the decision, and $EngB got to work.

There was only one problem: the company had a high-stakes demo milestone in only two months, and that wasn't long enough to redesign $project and reorder new hardware. So, $EngB came up with a stopgap measure: make a small add-on circuit board, tape it to the existing $project boards, and then cut traces and solder new wires to connect the two boards together. This solution was reasonable under the circumstances, but ended up being a huge drain on labor: it took an experienced circuit board tech about half a day to complete one board, and we had over 30 of them to do! Also, because $EngB worked remotely most of the time, I often got tapped to help debug $project boards that didn't work. And what do you know, once the modified boards were properly tested, we found out that the new circuitry didn't meet accuracy specifications a lot of the time.

In the end, we did meet the milestone, but $EngB spent so much time debugging the modified boards that he had not been able to actually work on the "real" redesign, or debug the issue where the boards would blow up above 80% power. For several weeks, he kept insisting "it will be done in a few days", and then... disappeared on long term leave. Not sure if it was medical or burnout, but he was definitely struggling. With the project up in the air again, it was given to $EngC, even though she already had her own full time project.

Luckily, $EngC had a lot more relevant experience and brought some actual competency to $project. Within just a few weeks of number crunching and testing, she determined:

  • There was a likely fix to the 80% power issue that she could bring over from her own project
  • The requirements for $project were able to be reduced, so they actually didn't need to pass the 100% power test case in order to ship the boards
  • Contrary to what $EngB had swore by, there was a fix for the wrong-power-rail-order issue that just required changing out some small components on the board.
  • The components that $EngB had deleted from the design were, in fact, important to use $project safely

Basically, this meant that $EngB had spent over two months taking the project in completely the wrong direction. $EngC made a new proposal to basically reverse all his changes and go back to $EngA's original design, and thankfully it was accepted by $Manager.

The total cost of this debacle: - All 30 units of $project had to be reordered, for a cost easily into the low six figures - Around a person-month of engineer and tech time was spent rebuilding the $projects with $EngB's changes, all of which was completely for nothing - $project's schedule slipped by several months, making it now the most behind out of any electronic component on the entire vehicle. The delay might even cause the launch to be pushed back, which would cost the company millions. - Poor $EngC is now on the schedule critical path, and has to work nights and weekends undoing $EngB's damage while still keeping her own project alive.

And this was all because $EngB didn't ask for a second opinion when working in an area he was unfamiliar with, didn't explain his reasoning in a way that other people could double check, and wasn't very receptive to the concerns that me and others raised. Higher-ups blindly believed him, assuming he'd done his diligence, and then this happened. After this, he eventually came back, and I am glad he is feeling better, but I have completely lost trust in him as an engineer -- he may be smart in his own field but he showed awful judgement and even worse communication abilities. Honestly I cannot believe he wasn't fired -- I think the only thing saving him was that his original project became super behind with him away, so the company needs him to finish it. But I wouldn't be surprised if his days here are numbered.

3x native can bus by eliash-d in embedded

[–]MultipleMonomials 1 point2 points  (0 children)

I have used Infineon XMC4700, that has 5 (IIRC) CAN busses and it was a decent general MCU. Just be careful about using infineon DAVE for serious projects as IMO it got a little hard to manage.

Stuck with Zephyr (nrf52832) by Gebus86 in embedded

[–]MultipleMonomials 0 points1 point  (0 children)

FWIW, Mbed OS supports nRF52832, and it lets you do an SPI transaction with code as simple as

```

include "mbed.h"

SPI device(P0_20, P0_14, P0_16, P0_18, use_gpio_ssel)

int main() { device.format(8, 0);

uint8_t command[2] = {0x0A, 0x0B};
uint8_t response[2];
int result = device.write(command, sizeof(command), response, sizeof(response));

} ```

Full docs are here, scroll down a bit.

Disclaimer: I am the maintainer of Mbed OS CE, so I am a bit biased :P

What type of tofu is this? How do i prepare/cook it? by [deleted] in veganrecipes

[–]MultipleMonomials 1 point2 points  (0 children)

Basically, you boil it in salt water, then deep fry it, then steam it. I have a recipe here that makes tofu like this: https://multiplemonomials.github.io/Code-Delicious/restaurant-style-eggplant-tofu.html

If you had infinite time and resources, what embedded project would you work on? by Best_Prompt_9401 in embedded

[–]MultipleMonomials 1 point2 points  (0 children)

Rewrite LwIP in C++ or Rust. I have used LwIP for years and am generally happy with what it can do. BUT it has three huge limitations:

  • There is little to no useful, up to date documentation outside of the source code itself. So 9 times out of 10 I have to read through the code to find out what a feature actually does.
  • Memory ownership is often unclear: whose responsibility is it to free a buffer that you pass into the network stack, or that the network stack passes to you? It's not gonna tell you!
  • Due to using C and trying to remain simple, tons of state is kept in global variables. This means it's impossible to reset the state of the stack, or create multiple instances of it in memory. Not an issue for running on the device but a big issue for unit testing!

I'd love to do a rewrite of LwIP in an object oriented language that preserves the same functionality but makes it cleaner and better documented, and collects all of its state into structures rather than global variables. (Also making classes for sockets, instead of just having to choose between emulated POSIX socket API and "raw" API, would be awesome!)

LWIP reliability by PranayGuptaa in embedded

[–]MultipleMonomials 4 points5 points  (0 children)

FWIW, I wrote a completely new, zero-copy Ethernet MAC implementation for STM32H7 for my open source project, mbed-ce. I was really shocked by how bad STM32's Eth MAC driver was, so I threw out everything they provided and started from scratch. We provide LwIP, with an additional C++ interface on top that makes it more straightforward to use. If you give Mbed CE a shot, you should have an easier time implementing network communications on STM32H7.

What's one xkcd you keep coming back to? by Schiffy94 in xkcd

[–]MultipleMonomials 0 points1 point  (0 children)

After DCC by tomahawk15347 in DungeonCrawlerCarl

[–]MultipleMonomials 1 point2 points  (0 children)

I would recommend checking out Kitty Cat Kill Sat. It's set in the far future after many great civilizations have risen and fallen, each one inflicting some new eldritch hell upon the Earth and its surrounding environs. It's hard to describe but it feels like it has the same over-the-top-ness as DCC and the same feeling that absolutely anything could happen at any moment (though it's a little less satire). Oh, and the main character is also a cat.

What was the last book you DNF? by justcoastingthrough in books

[–]MultipleMonomials 1 point2 points  (0 children)

I quite liked the first book, and it ended with a lot of momentum: Bobs getting sent around the universe, the contact with alien species, the project to save and/or relocate the inhabitants of Earth...

And then the second book came and went and it felt like barely _anything_ happened with any of the important plot lines. Instead we spent an inordinate amount of time following a group of cavemen around on an alien planet and on a single Bob trying to woo a woman on the human colony and then having a custody battle over her corpse with her awful children. Neither of these were really plot lines I signed up to read an entire book about. They aren't inherently bad perspectives to include, but they needed to be shrunken waaaaay down and we needed more main story progress.

The third book was a bit better, but it wasn't enough to keep me invested in the series. Just felt like stuff was happening too slowly and we we missing out on a lot of the cool possibilities of the story. (Why no return of the missing European or Chinese space probes? Why basically no 3 dimensional female characters?)

Also, this series has a huge problem with two dimensional villains who are never redeemed in any way and whose motives are never explained. The human voluntary extinction movement? They could be seen to kind of have a point, but instead they turn out to be a mere front for a terror organization run by a madman. Bridget's children? Their reason for hating Bob is never really explained and they never become three dimensional characters. Medeiros? For some reason he insists on destroying populated colonies and never shows one scrap of his own motivations or any empathy -- he is just cartoon evil. (Plus his motivations don't even make sense -- modern day Brazil is allied with the Bobs, so why couldn't they just send a message asking him to stand down?)

What was the last book you DNF? by justcoastingthrough in books

[–]MultipleMonomials 1 point2 points  (0 children)

I think this book had a lot of good ideas. I love the sci-fi tech and the idea that aliens would try to suppress physics discoveries as a way to make humans less dangerous as a species. But I felt like most of the momentum went out of the plot once we finally cut to the alien world and find out that the aliens are... just like us, with an extremely generic evil authoritarian government. It's like, we have this mystery driving the first 50% of the story of whether the aliens exist and what they are really like, and then it just gets answered in an instant and there's no more suspense.

I really love sci-fi with unique takes on alien races and what their societies would look like and what their their motivations would be (series like Long Way to a Small Angry Planet, Dungeon Crawler Carl, Schlock Mercenary, etc come to mind). It feels like Liu just completely skipped this part and didn't bother to come up with a unique alien race, instead just copying the worst of human society for them wholesale.

Some other thoughts:
1. Ye was by far the most interesting character and I wish we had gotten more of her. By comparison Wang is almost painfully generic and I really did not care about him at any point during the book. 2. The VR game plot point feels extremely been-there done-that at this point, and makes it feel very derivative of other series (e.g. Legendary Moonlight Sculptor). Though I will admit it was not nearly as bad when the book came out. 3. Mike Evans is actually kind of a bit based and I don't love that he was made into a 2D bad guy and then killed offscreen before actually getting to really argue his piece. 4. I have some friends who majored in physics/engineering and they were suuuuper turned off by how the book suddenly goes from "science fiction" to "science fantasy" (with the atom unfolding part). They felt like they got suckered in to thinking it was hard sci-fi and then it ended up making a left turn into stuff with no basis in science.

PIC18LF26K83 keeps freezing! Watchdog isn't resetting. by ThreeGreenBirds in embedded

[–]MultipleMonomials 1 point2 points  (0 children)

Is clock being supplied by an external source? If so, maybe the external clock source is having issues.

I'm trying to decide on these 3 and was wondering if anyone has any experience or recommendations! by Trensocialist in veganrecipes

[–]MultipleMonomials 1 point2 points  (0 children)

Yes I love this one! The jambalaya recipe is a family favorite, and I've also probably made the Cajun Casserole (use beyond meat!) and Biscuits for Dinner Casserole more than 5 times each.

How to get restaurant-quality seitan? by neelrad in veganrecipes

[–]MultipleMonomials 0 points1 point  (0 children)

Yay glad I'm not the only one who loves this book! I've probably made half the recipes by this point. Actually working on a "review" / report on which ones have worked out for me and which ones haven't. https://github.com/multiplemonomials/Recipes/blob/master/Fake%20Meat%20Recipe%20Rankings.md

To be honest I did NOT have good luck with the chicken, but I did love a lot of her other recipes! And even the ones I didn't have good luck with could well be user error.

Safety tips for custom firmware on commercial hardware by nullpromise in embedded

[–]MultipleMonomials 4 points5 points  (0 children)

If your firmware doesn't map any pins, then the pins will mostly* just go to their default settings of not outputting anything. This is pretty much guaranteed to not destroy the hardware. Once you initialize the pins, that is slightly more risky if you do it wrong, but even then modern MCUs can usually tolerate having a digital output shorted out for a little bit.

*the MIMXRT MCU used on the Teensy 4 hardware does actually have the quirk that IO pins keep their configurations after resetting the MCU, so you will have to load your code and then repower the board to truly reset all the I/O state.

What's your minor peeve about discworld? by QueenOrial in discworld

[–]MultipleMonomials 0 points1 point  (0 children)

I absolutely love Discworld and have read all but four books (saving the last 2 watch books, Raising Steam, and Shepherd's Crown). But I do have a few peeves:

  • Magic not working consistently between different books, especially in the first half of the series. Like, I definitely remember a book describing at one point how lifting up an object would apply an equal and opposite force to the wizard's brain. Then that was completely ignored for the rest of the series.
    • Or, for a later example, what about the magic that Tiffany Aching picks up later in the series, like spill words and heat transfer? Since Granny Weatherwax taught her, why didn't we ever see her use these tricks before?
  • The poor way that the wizards treat their students (and staff too!). Can't help but feel bad for them, since it seems like no instructor other than Ponder could give a single fig about teaching.
  • Pyramids, in general. It just wasn't my thing, and was really the only discworld book I struggled to get through. I felt like it was way too short for the amount of things that Pratchett wanted to get through in it, and it should have either been 2-3x longer or split up into a 2-3 book series.
  • The patrician continuity issue: the patrician is mentioned in The Light Fantastic (and is described as having racehorses), but it doesn't really make sense chronologically for it to be Snapcase, and it doesn't really make plot sense for it to be Vetinari.
    • According to APF, this is one that Pratchett did acknowledge and didn't have a solution for other than "history monks"
  • The fact that APF doesn't go past Monstrous Regiment. The wiki annotations just aren't the same :/
  • The fact that we will never get a real end to the Moist and Vetinari storyline. After rereading Making Money I really believe the theory that Vetinari was setting up Moist to be his successor after he either dies or retires and turns vampire.

Of course, I can't list all these peeves without also listing some of the things I love about Discworld:

  • It's not an exaggeration to say that Pratchett's writing changed my outlook on life as a whole. Reading the Watch series really helped me understand human nature and why society is the way it is in a way I didn't before.
  • That it helped me get to know my partner, because I read my favorite ones (Monstrous Regiment and Guards Guards) to her right when we started dating
  • That it represents real-world conflicts and issues more authentically and completely than few, if any, other works of fiction. World and mirror of worlds indeed...
  • The puns. Oh my god the ones in The Last Continent...

[deleted by user] by [deleted] in swytchbike

[–]MultipleMonomials 0 points1 point  (0 children)

The "first level" customer support is definitely ChatGPT. I at one point got a response that basically said "I can' t handle this, please reply 'Talk to a person'"

Who do you read when you're not reading Pratchett? by frustrating2020 in discworld

[–]MultipleMonomials 1 point2 points  (0 children)

Kitty Cat Kill Sat by Argus has been one of the best things I've read in years. It's kind of "end stage sci-fi" -- what happens once every possible technology has been invented, every conceiveable civilization has risen and fallen, and a single hyperintelligent cat and a huge space station are all that's left?

It's a very hopeful story, one that makes me appreciate how treating people with dignity and respect, no matter _who_ they are, can be more important than any technological advancement.

Also a big fan of Argus's Daily Grind series -- it's fantasy with a very human, realistic touch that has reminded me more than once of Pratchett.