I’ve been thinking for a long while about making a standalone... thing. Something to mark a milestone in my amateur electronics career. I had the idea of making a standalone version of my LED game from previous blogs, complete with a display and a power source. Problem is that it requires the Raspberry Pi to operate, so I was left with the choice of where to go next.
I’d been looking into Arduinos for a while as a way to make a step up to something with a little less help (like, say, an operating system) to get tasks done. The cheapest option with everything I needed seemed to be a cheap Uno clone, and Elegoo make one for about 7 quid. I’d bought their electronics kit before some months ago and apart from a slightly loose connection on some areas of the breadboard I’d been pleased with the product.Everything arrived and the first thing I did was a breadboard blinky LED, obviously. The issue for me was converting to C after doing so much in Python. I love Python. It's amazing. It's great for idiots like me who treat coding as more like scripting than about devising algorithms yourself. I just glue stuff I find together and pick stuff up along the way - the stereotypical Stack Overflow coder. Probably learn bad habits as well. But the Arduino libraries make things much easier. digitalWrite() may as well be gpio.output() given how similar the syntax is.
Next I converted the LED game code, using the original board I made some months back. Seemed fine, worked first time, converting Python to C isn't as hard as it looks at first. It's also cool having something that self-boots and runs by itself. Obviously you can do that with an RPi, but when you're just doing something as a test or as a one-off you tend not to do that. With an Arduino it just happens, nothing to set up. This makes it much nicer for this kind of application, although obviously having no OS means you have to work a bit harder to do some things. OK - we're on a roll. What can we do next? Well, what about converting the LED matrix display I made to work with the Uno? Easy peasy. Took me thirty minutes to convert it. That's very cool. Clearly some things will be harder to convert with others, but if you've done something simple on an RPi and thought "bit overkill" then it's relatively simple to convert these tiny apps to Arduino sketches. You'll see that there's a different board connected here to the right of the matrix, which leads to the next topic.Clearly we have a decent platform here, and something that I can probably use in a standalone format to run lots of simple circuits. The problem is that I don't want to pay 7 quid for a new Uno everytime for the privilege. Thankfully there's a way we can do this kind of thing without having to do that, and that's to make your own cut-down version of an Arduino, using the main ATMEGA328P chip as a base. I'll do a post looking at my adventures into this area soon, but suffice to say I've had mixed results. I can get a chip going and powered in its default state, but I can't change any settings. I also wasted a chip after I soldered it into a circuit that wasn't working properly and that I can't fix. All the legs are bent now so it'll be hard to pull it out.
As ever with this kind of thing my usual stumbling block is having enough ideas for things to do with the kit. It's for that reason that I bought a bunch of sensors and comms boards from AliExpress, and those should arrive soon. I got so much kit...
Honestly, if there’s a sensor or thing you can think of I bought it. And the best thing is that even with ordering from shonky stores on the website I only had one item be incorrect. I ordered some programmable LED strips and I got sent instead... a ladies leather purse!
But I got ultrasound sensors, radio transmitters, an SD card reader, a pressure/altitude/temperature sensor, some odd parts such as inductors and resistors, some nice chips like audio amplifiers, some level shifters for combined 5V and 3.3V work, and so much more. Now all I need is an imagination, which is harder than it sounds.
Comments
Post a Comment