Tom Gidden

@tomgidden
47 Followers
73 Following
82 Posts
Geek. Co-edits @dailydingbats. Plays with RPi, IoT, NodeJS, Minecraft and stuff.
Bloghttps://gidden.net/
#bbcmicrobot DIMn(321),c(321),a(2):MO.1:F.Y%=0TO255:a(0)=3.4+.9*Y%/256:F.X%=0TO321:c(X%)=n(X%):n(X%)=0:N.:e=0:F.X%=0TO319:a(1)=2.5+X%/320:z=0:c=.5:R%=15:M%=8:F.J%=1TO10:r=a(R%AND1):R%=R%DIV2:M%=M%-1:IFM%=0THENR%=Q%:M%=L%
c=r*c*(1-c):r=ABS(r-2*r*c):z=z+LOG(r):N.:v=-z*1.4+3+e+c(X%):IFv<0THENv=0ELSEIFv>6THENv=6
V%=v+.5:IFV%<0THENV%=0ELSEIFV%>6THENV%=6
E=v-V%:e=E*.44:IFX%THENn(X%-1)=n(X%-1)+E*.19
n(X%)=n(X%)+E*.31:IFX%<320THENn(X%+1)=n(X%+1)+E*.06
GC.0,V%:PL.69,X%*4,Y%*4:N.:N.

Woke up with a bad headache.

Literally and apparently metaphorically.

MacOS thing I just learned: 1 ⌥⇧1 2 : 1⁄2.

It doesn't work in all apps, but does seem to work in Chrome, Firefox, Notion. And in other apps, eg. Notes app, Mail app it returns something that when pasted into Chrome will result in the fraction. It's U+2044 FRACTION SLASH.

To answer the second part, I figured that out shortly after: MQTT. Use MQTT.js to talk to a public free MQTT test server -- as this is low bandwidth, low security, low importance -- and pass info that way.

I got it working in "multiplayer", pretty much by sharing the random number generator seed and then sharing key presses. State synchronisation's faulty, so I wouldn't call it done, but it's there.

Wondering if I should bother fixing it.

I was bored, so I ported BARRAGE from the BBC Micro to JavaScript.

http://barrage.gidden.net

(BTW, is there such a thing as a WebSocket reflector or something like that, to do cheap, lightweight comms between two browsers? Want to make this two-player online without having to setup a server...)

#retrogaming #bbcmicro

Just spent two hours troubleshooting why a Pimoroni Pico Audio + Pico Lipo set up as a BT a2dp sink (to turn my nineties boombox into a BT speaker) wasn't appearing at all.

Then I realised it's because the Pico Lipo doesn't have Wifi/BT. *thud*

Replaced with a Pico WH -- no Lipo charging :( -- and suddenly it all works... it's just the "a2dp_sink_demo" example code, unaltered.

Very low noise and no glitching.

Since last night, I had some thoughts.

First, I don't need the calibration cube and computer vision thing. For training simply put a battery-powered 9 d.o.f IMU with a tiny microcontroller of some kind with some low power networking -- Zigbee, NRF24L01, etc. to report orientation.

Then… is it possible/feasible to recharge a battery, or maybe even just a supercapacitor with a weighted rotor, like an automatic wristwatch? Either with normal use, or a high-speed "charging" cycle.

While I have VERY few hours of time/stamina to spend on this project per _year_, I do ponder it quite a lot.

Thanks to @grant_h for the magnetometer idea. It still seems like the best option if I can get it to work.

Apologies for the massive brain dump, BTW. Thanks if you got this far.

Another idea is to get some IR-reactive paint (if it exists) and IR-illuminate random dots on the globe that can be picked up by an Optical Flow algorithm. I did try tiny spots of 3M retroreflective tape inside the globe, but couldn't resolve them reliably with a Pi NoIR camera. And I'm not sure I could detect absolute orientation from a unique pattern of dots in any position - or at least a) be able to paint a unique pattern and b) be able to recognise it at any orientation quickly.

At this point I'm wondering about going for the "easy" option and actually putting most of the sensors inside the globe - just a couple of 9-DoF fusion sensors for gravity and resolving gimbal lock, along with a LiPo battery and an ESP32 microcontroller. I was hoping for the globe to remain passive to avoid the need for recharging and thus allow for continuous 24/7 use, but I just can't reliably solve the orientation issue. 🙁