Jump to content

Recommended Posts

Posted

I am a primary teacher and have been teaching Scratch to my classes over the years. This year we have taken it a small bit further by connecting a Micro:BIT. The students have enjoyed this a lot as they can control their characters using the buttons. They wanted to make some two player games though.

 

Has anyone got experience of connecting a simple USB joystick to a Windows PC (or even better a ChromeBook) and using it to control Scratch?

 

I have Googled the topic and read about software that will map the movements of the joystick to specific keyboard buttons.

Posted
Has anyone got experience of connecting a simple USB joystick to a Windows PC (or even better a ChromeBook) and using it to control Scratch?

 

I think what you're asking for is a simple joystick that emulates a keyboard, sending (say) "1" for up, "2" for right, etc. I've not seen a joystick like that, but I have used this footswitch:

 

https://www.amazon.co.uk/gp/product/B08DSLD1KQ/ref=ppx_yo_dt_b_search_asin_title

 

The above is programmable via some Windows-only software to emulate any keypress (or several keypresses, I think), once programmed it can be used on any Windows PC / Mac / Chromebook / Raspberry Pi / etc. I used four, programmed to "a", "b", "c" and "d", for a very simple quiz system, with the foot pedals used as answer buzzers:

 

https://www.sansay.co.uk/quiz/

 

The software for programming the footswitches is available here:

 

https://www.software.pcsensor.com/pc_en.html

 

I see on that page this seems to be the same company that makes the various cheap USB temperature sensors available on Amazon, which can also report values via simple keyboard emulation. I have some scripts for the Raspberry Pi for use with their TEMPer temperature sensors if that's any help.

 

You could try constructing a joystick from four single keys in a box with a stick in the middle. Single programmable USB keys are available:

 

https://www.aliexpress.com/item/1005003402586960.html

 

You'd need four, and probably a small USB hub, so probably around £50 for parts before you start.

  • Thanks 1
Posted

 

Ah! If you combined that with a simple 9-key USB keyboard:

 

https://www.amazon.co.uk/Mechanical-Multifunctional-Programmable-Adjustable-Compatible/dp/B08V4PKKJY

 

Stick some kind of box around it with a hole in the top for the joystick - you might even find it can handle 8 directions (diagonals as well as straights).

 

Turns out using the WASD keys as arrow / joystick controls is a kindof-a-standard, so if you programmed the keyboard to be W=up, S=down, A=left and D=right (or just programmed them as arrow keys) it might even work with existing games.

  • Thanks 2
Posted (edited)

Cheaper (£14 each) 9-key keyboards available on eBay:

 

https://www.ebay.co.uk/itm/304795412176

 

I reckon just remove the middle key and rest a stick with 4 (or maybe 8) side flanges in the hole. Bit of card / wood over the top with a hole in the centre - probably easy enough to have custom decal stickers if you wanted to have pupils able to design their own.

 

Edit: I've ordered one to try out - shipping from China, so will be a couple of weeks.

Edited by dhicks
  • Thanks 1
Posted
There are various utilities that enable you to map keys to a gamepad. Some might be a bit hard to track down as, since Steam made it easy to do so, they've fallen out of favour. If this might be an option, you could try searching for Padstarr or Pinnacle Game Profiler. IIRC the two were from the same, possibly now deceased, guy and at one stage the latter site was serving malware so at your own risk. Xpadder and http://controllercompanion.com/ both seem to still be going concerns and are cheap options.
  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...