Posts

Showing posts with the label Arduino

Micro:Bit and SPI display

I want to explore the full potential of the BBC Micro:bits my school has. Making rock-paper-scissors games and the like is all well and good, and the students love it (for the most part), but it always feels a little bit gimmicky.  But when students really get engaged and suggest ideas for them (e.g. games, compass display), it all gets a little bit cramped and feels like it could  kinda  work, but not really . Then I found out that all the tiny strips on the edge are actually GPIO pins, not just the fat 0, 1 and 2 ones.  Since then, I've wanted to explore what I can do with it. Hence, over the last few days I have been trying to get the microbit to control a TFT display. I first went for this 2.4" display with a touchscreen.  The SPI interface is just for the microSD, not for the screen but I didn't think that would be a problem because the micro:bit has so many pins.  After much frustration, I discovered that there are many of the pins you can't reliabl...

Joystick Realisations

Image
Yesterday I had extreme difficulty in doing air-to-air refueling in DCS World. The obvious reason for that would be that it is an extremely difficult thing to do and I am just not good enough yet. Not being happy admitting my own lack of ability, I decided to blame my homemade joystick. To be fair, my joystick was built by a numpty (me), so there could easily have been something screwy with it. When researching more expensive potentiometers, I discovered that 'linear' potentiometers do not necessarily give a linear response to changes in angle.  It depends on potentiometer model, temperature, and all sorts of other things. Seeing as the potentiometers I used were the cheapest I could possibly find, their quality is questionable at best.  So I figured I'd have to measure the response curve, then hard-code a calibration fudge. I was genuinely surprised with the results: There is a beautiful linear section for part of the response, but the bit from 55-75 degrees is just shock...

Homemade Joystick - Part 3

Image
Final mammoth post about an epic journey... TLDR: I dun maed a joystick out of wood and Stuff. The Abridged Backstory: I've been planning this for literally years .  The tools and materials available to me have expanded over that time.  My original plan was to make it out of cardboard using a Stanley knife and PVA.  Nobody was convinced that was going to work. This one is mostly built out of hobbyist plywood and dowels using a scrollsaw, power drill, Stanley knife and scalpel. The Base Frame: I have talked about the base frame in a previous post . A brief side note: My 3D printer is a relatively cheap setup from ALDI .  Software set up was a breeze on a Windows laptop.  I chose to print patterns from SD card rather than laptop (laptop hibernate aborted models halfway through).  I needed to cleanup prints with a scalpel afterwards, but has worked fine so far with no obvious signs of wear. How I'd do it differently in future: I'd try...

Homemade Joystick - Part 2

Image
The next update on the joystick I started a few weeks ago . The horizontal axis was way too loose, which meant the gears had too much play and started skipping when you moved the stick quickly.  So I had to re-make the end support.  Now it is ridiculously stiff instead.  Hey ho. Another thing I've made is a module for an analogue hat to go on top.  I stripped out the components from a knock-off XBox 360 controller I got ages ago on ebay and attached one of the joysticks to a piece of matrix-board.  I'm still not entirely sure how I want it wired up to the Arduino, so I bought some right-angle header pins that I can attach jumper leads to later on. The joystick had four mounting tabs, which poke through the board so they can be bent and soldered to provide a strong physical bond between the component and the board.  I had to enlarge the holes with a twist-drill, but they lined up pretty well so it wasn't too troublesome. The microswitch for th...