ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Announcements and Showcase
forum topic indicator BBC micro:bit controlled game showcase
person icon
okeoke
Registered User
Quote
2025-09-19 15:11:47

The intention was to make a pirate ship runner-like game controlled by a wheel. I don't currently have arduino or some other decent device, but I have this small toy-microcontroller. It can't work as a hid, but it can write to serial port, and has an accelerometer, which I'm using here.

Microbit is connected to pc using usb, and acts as a serial port. Every 20 ms it writes accelerometer's x value to serial. On pc I'm running a simple node js backend app, which reads on that serial port, and also runs a websocket server, that basically broadcasts that data to every connected client, as soon as the data is received.

I modified coppercube source files to include a websocket client https://github.com/dhbaird/easywsclient. It was actually much easier then I thought. I'm also not sure why I didn't done that before - multiplayer is much easier if you can use websocket.
https://youtu.be/OABv9CYJJRI

person icon
guest_coa
Guest
Quote
2025-09-20 08:24:23

nice!

person icon
just_in_case
Moderator
Quote
2025-09-20 12:38:10

This is amazing, one can also use their Android device to do stuff like this if they don't own the Arduino or Other micro controllers.

you can use android's accelerometer(gyroscopic) features over wifi (same network) or via usb cable to control stuff in your game.

@okeoke, doing it with websocket is just amazing, and the demo you have shown is just wonderful, great job mate. emoji icon_holy

person icon
VP
Guest
Quote
2025-09-20 16:37:00

How far ccan this go - could it do like wii sport with a tennis racket/bowling-ball for example? Do you remember JediKnight with the lightsabers? That would be insane to see on coppercube, controlled by a microchip!

person icon
okeoke
Registered User
Quote
2025-09-20 17:10:43

Hey, thanks for the responses:)

I guess, with that particular device you can't do that much. Accelerometer actually works pretty nice, but it can only detect moving up/down, and tiling it left/right and forward/backwards. It is enough for for some 2d controls. Like you can make a game there you need to run a ball in a labyrinth, but racket or saber seem to be little too complex.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |