<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Georg</id>
	<title>Experimental Game Cultures - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Georg"/>
	<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php/Special:Contributions/Georg"/>
	<updated>2026-05-18T09:43:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=MediaWiki:Sidebar&amp;diff=692</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=MediaWiki:Sidebar&amp;diff=692"/>
		<updated>2026-03-23T09:26:10Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
&lt;br /&gt;
** SEARCH&lt;br /&gt;
&lt;br /&gt;
* General Info&lt;br /&gt;
** Studying info|Studying info&lt;br /&gt;
** Department PC|Department PC&lt;br /&gt;
** Game library|Game library&lt;br /&gt;
** Borrowing|Borrowing Equipment&lt;br /&gt;
** 3D Printing|3D printing&lt;br /&gt;
&lt;br /&gt;
* Classes&lt;br /&gt;
** Core Subject|Core Subject&lt;br /&gt;
** Experimental Game Engines|Game Engines&lt;br /&gt;
** Experimental Game Mechanics|Game Mechanics&lt;br /&gt;
** Avatars, Open Worlds, Metaverse and Art | Avatars, Open Worlds, Metaverse and Art&lt;br /&gt;
&lt;br /&gt;
* Communication&lt;br /&gt;
&lt;br /&gt;
* Reference Materials&lt;br /&gt;
** Physical Controllers | Physical Controllers ★&lt;br /&gt;
** 3D | 3D&lt;br /&gt;
** Graphic Design | Graphic Design&lt;br /&gt;
** Video Editing | Video Editing&lt;br /&gt;
** Coding | Coding&lt;br /&gt;
** ASCII | ASCII&lt;br /&gt;
** Drones | Drones&lt;br /&gt;
** Twine | Twine&lt;br /&gt;
&lt;br /&gt;
* How To&lt;br /&gt;
** Text Formatting|Text Formatting&lt;br /&gt;
** Uploading Images|Uploading images&lt;br /&gt;
** Adding Videos|Adding Videos&lt;br /&gt;
&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;br /&gt;
&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
&lt;br /&gt;
* Robopsy&lt;br /&gt;
** AIplay | AIplay&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=672</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=672"/>
		<updated>2025-03-03T15:31:14Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* OTHER INFO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Tips:&amp;lt;/b&amp;gt;&lt;br /&gt;
You may need to install drivers for CH341 chip. In Arduino IDE you need to install the ESP32 Board (espressif). Also make sure you are using the right port (plug into the board itself with USB-C). Set the Baud Rate correctly and you may need to restart your PC if your ports don't work. Also you may need to hold the Boot Button before it uploads, otherwise you get an error during upload. I used the ESP32 Dev Module Firmware for my ESP32 WROOM-32.&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with ESP 32 ==&lt;br /&gt;
Deep sleep current is way lower than on the RPI Pico (15 μA (0.015 mA)), see this example for a sensor that sends data every 10 minutes:&lt;br /&gt;
Using ESP NOW and sending data every 10 minutes using a 6000mAh battery: (~1 year)&lt;br /&gt;
&lt;br /&gt;
https://youtu.be/xHCJESpj6l0&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=671</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=671"/>
		<updated>2025-03-03T15:18:02Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* ESP 32 + ESP Now */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Tips:&amp;lt;/b&amp;gt;&lt;br /&gt;
You may need to install drivers for CH341 chip. In Arduino IDE you need to install the ESP32 Board (espressif). Also make sure you are using the right port (plug into the board itself with USB-C). Set the Baud Rate correctly and you may need to restart your PC if your ports don't work. Also you may need to hold the Boot Button before it uploads, otherwise you get an error during upload. I used the ESP32 Dev Module Firmware for my ESP32 WROOM-32.&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=670</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=670"/>
		<updated>2025-03-03T15:17:40Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* ESP 32 + ESP Now */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
===Tips:===&lt;br /&gt;
You may need to install drivers for CH341 chip. In Arduino IDE you need to install the ESP32 Board (espressif). Also make sure you are using the right port (plug into the board itself with USB-C). Set the Baud Rate correctly and you may need to restart your PC if your ports don't work. Also you may need to hold the Boot Button before it uploads, otherwise you get an error during upload. I used the ESP32 Dev Module Firmware for my ESP32 WROOM-32.&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=669</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=669"/>
		<updated>2025-03-03T15:17:29Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* ESP 32 + ESP Now */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
**Tips:**&lt;br /&gt;
You may need to install drivers for CH341 chip. In Arduino IDE you need to install the ESP32 Board (espressif). Also make sure you are using the right port (plug into the board itself with USB-C). Set the Baud Rate correctly and you may need to restart your PC if your ports don't work. Also you may need to hold the Boot Button before it uploads, otherwise you get an error during upload. I used the ESP32 Dev Module Firmware for my ESP32 WROOM-32.&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=668</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=668"/>
		<updated>2025-03-03T15:17:14Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* ESP 32 + ESP Now */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
Tips:&lt;br /&gt;
You may need to install drivers for CH341 chip. In Arduino IDE you need to install the ESP32 Board (espressif). Also make sure you are using the right port (plug into the board itself with USB-C). Set the Baud Rate correctly and you may need to restart your PC if your ports don't work. Also you may need to hold the Boot Button before it uploads, otherwise you get an error during upload. I used the ESP32 Dev Module Firmware for my ESP32 WROOM-32.&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=667</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=667"/>
		<updated>2025-02-23T19:44:55Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=666</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=666"/>
		<updated>2025-02-23T19:44:37Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* ESP 32 + ESP Now */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
Short explanation - you need to assign MAC Adress of receiver ESP now in this example. (tested)&lt;br /&gt;
[[File:Esp32-NOW-example.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Esp32-NOW-example.zip&amp;diff=665</id>
		<title>File:Esp32-NOW-example.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Esp32-NOW-example.zip&amp;diff=665"/>
		<updated>2025-02-23T19:43:47Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=664</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=664"/>
		<updated>2025-02-23T19:43:30Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. Unfortunately not very reliable.. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== ESP 32 + ESP Now ==&lt;br /&gt;
&lt;br /&gt;
Best strategy - about 8.- each. Follow this tutorial for detailed explanation. Long distance and relatively easy to use. Uses Esp Now Protocol.&lt;br /&gt;
https://www.youtube.com/watch?v=bEKjCDDUPaU&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=663</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=663"/>
		<updated>2025-02-20T15:58:59Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Raspberry Pico W To Raspberry Pico W */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
TIP: Make sure if the Wifi connection doesnt work that you switch to another PC or don't have them both on the same PC. This could interfere!&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=662</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=662"/>
		<updated>2025-02-20T11:59:30Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* One Wire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
https://www.elektronik-kompendium.de/sites/raspberry-pi/2703071.htm&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=661</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=661"/>
		<updated>2025-02-20T11:59:16Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* One Wire */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
[[File:Onewire.png || 300px]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Onewire.png&amp;diff=660</id>
		<title>File:Onewire.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Onewire.png&amp;diff=660"/>
		<updated>2025-02-20T11:58:51Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=659</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=659"/>
		<updated>2025-02-20T11:58:33Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== One Wire ==&lt;br /&gt;
&lt;br /&gt;
Just needs one wire + vcc + gnd to communicate. Maybe a good idea?&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=658</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=658"/>
		<updated>2025-02-18T12:44:34Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Raspberry Pico W To Raspberry Pico W */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. (~14 EUR) One Pico acts as a Server, one as a client, they communicate wirelessly this way. In the code I made, I used a OLED Display although that could be omitted.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
The scripts are here (put one on host pico and one on client, host has the screen)&lt;br /&gt;
&lt;br /&gt;
[[File:PicoComms.zip]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:PicoComms.zip&amp;diff=657</id>
		<title>File:PicoComms.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:PicoComms.zip&amp;diff=657"/>
		<updated>2025-02-18T12:44:06Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=656</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=656"/>
		<updated>2025-02-18T12:41:34Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Raspberry Pico W To Raspberry Pico W */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. One Pico acts as a Server, one as a client, they communicate wirelessly this way.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG|300px]]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=655</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=655"/>
		<updated>2025-02-18T12:41:19Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. One Pico acts as a Server, one as a client, they communicate wirelessly this way.&lt;br /&gt;
&lt;br /&gt;
[[File:RaspberryPicoComms.PNG]]&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:RaspberryPicoComms.PNG&amp;diff=654</id>
		<title>File:RaspberryPicoComms.PNG</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:RaspberryPicoComms.PNG&amp;diff=654"/>
		<updated>2025-02-18T12:40:57Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=653</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=653"/>
		<updated>2025-02-18T12:39:46Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pico W To Raspberry Pico W ==&lt;br /&gt;
&lt;br /&gt;
Could be your simplest and cheapest option. One Pico acts as a Server, one as a client, they communicate wirelessly this way.&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=650</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=650"/>
		<updated>2024-11-06T14:34:30Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
The installation needs drivers to be installed and in the Arduino IDE to add the boards.&lt;br /&gt;
https://docs.heltec.org/general/establish_serial_connection.html#for-windows&lt;br /&gt;
&lt;br /&gt;
Here are simple tested custom files for Arduino (receiver and sender).&lt;br /&gt;
[[File:HeltecWifiLora32V3.zip]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:HeltecWifiLora32V3.zip&amp;diff=649</id>
		<title>File:HeltecWifiLora32V3.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:HeltecWifiLora32V3.zip&amp;diff=649"/>
		<updated>2024-11-06T14:32:58Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=648</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=648"/>
		<updated>2024-11-06T14:32:40Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* COMMUNICATIONS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
Did not work..&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
== Heltec Lora 32 V3 ==&lt;br /&gt;
Quite overpowered for simple things, but can connect to wifi and use and charge a battery. Low power consumption, has OLED screen.&lt;br /&gt;
Simple transfer of data seemed to be working very well. 30 Euro per device.&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=647</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=647"/>
		<updated>2024-11-06T12:10:38Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use. Quite unreliable, can be subject to noise. May require additional power supply or filtering of power line noise.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== NRF24L01 ==&lt;br /&gt;
https://coffeebreakpoint.com/micropython/how-to-connect-a-nrf24l01-transceiver-to-your-raspberry-pi-pico/&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=646</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=646"/>
		<updated>2024-11-06T12:08:50Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= COMMUNICATIONS =&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=645</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=645"/>
		<updated>2024-10-31T12:07:58Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* 433 MhZ Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
https://www.instructables.com/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:433RECEIVE.zip&amp;diff=644</id>
		<title>File:433RECEIVE.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:433RECEIVE.zip&amp;diff=644"/>
		<updated>2024-10-31T10:54:24Z</updated>

		<summary type="html">&lt;p&gt;Georg: Georg uploaded a new version of File:433RECEIVE.zip&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=643</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=643"/>
		<updated>2024-10-31T10:52:34Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* 433 MhZ Transmitter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
&lt;br /&gt;
[[File:433RECEIVE.zip]]&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:433RECEIVE.zip&amp;diff=642</id>
		<title>File:433RECEIVE.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:433RECEIVE.zip&amp;diff=642"/>
		<updated>2024-10-31T10:52:21Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=641</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=641"/>
		<updated>2024-10-31T10:51:44Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* OTHER INFO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== 433 MhZ Transmitter ==&lt;br /&gt;
&lt;br /&gt;
For short distances, cheap and easy to use.&lt;br /&gt;
&lt;br /&gt;
https://funduino.de/nr-03-433mhz-funkverbindung&lt;br /&gt;
&lt;br /&gt;
[[File:433receive.py]]&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Twine&amp;diff=640</id>
		<title>Twine</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Twine&amp;diff=640"/>
		<updated>2024-10-24T10:46:53Z</updated>

		<summary type="html">&lt;p&gt;Georg: Created page with &amp;quot;Twine tips&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Twine tips&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=MediaWiki:Sidebar&amp;diff=639</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=MediaWiki:Sidebar&amp;diff=639"/>
		<updated>2024-10-24T10:46:45Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
&lt;br /&gt;
** SEARCH&lt;br /&gt;
&lt;br /&gt;
* General Info&lt;br /&gt;
** Studying info|Studying info&lt;br /&gt;
** Department PC|Department PC&lt;br /&gt;
** Game library|Game library&lt;br /&gt;
** Borrowing|Borrowing Equipment&lt;br /&gt;
** 3D Printing|3D printing&lt;br /&gt;
&lt;br /&gt;
* Classes&lt;br /&gt;
** Core Subject|Core Subject&lt;br /&gt;
** Experimental Game Engines|Game Engines&lt;br /&gt;
** Experimental Game Mechanics|Game Mechanics&lt;br /&gt;
** Avatars, Open Worlds, Metaverse and Art | Avatars, Open Worlds, Metaverse and Art&lt;br /&gt;
&lt;br /&gt;
* Communication&lt;br /&gt;
&lt;br /&gt;
* Reference Materials&lt;br /&gt;
** Physical Controllers | Physical Controllers ★&lt;br /&gt;
** 3D | 3D&lt;br /&gt;
** Graphic Design | Graphic Design&lt;br /&gt;
** Video Editing | Video Editing&lt;br /&gt;
** Coding | Coding&lt;br /&gt;
** ASCII | ASCII&lt;br /&gt;
** Drones | Drones&lt;br /&gt;
** Twine | Twine&lt;br /&gt;
&lt;br /&gt;
* How To&lt;br /&gt;
** Text Formatting|Text Formatting&lt;br /&gt;
** Uploading Images|Uploading images&lt;br /&gt;
** Adding Videos|Adding Videos&lt;br /&gt;
&lt;br /&gt;
* TOOLBOX&lt;br /&gt;
* LANGUAGES&lt;br /&gt;
&lt;br /&gt;
** helppage|help-mediawiki&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=638</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=638"/>
		<updated>2024-06-20T09:28:59Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* OTHER INFO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
== RASPBERRY PI AUTOSTART SCRIPTS ==&lt;br /&gt;
&lt;br /&gt;
This is the best way to do it (in my experience):&lt;br /&gt;
&lt;br /&gt;
Make a shell (.sh) script that enters virtual env (optional) and then runs the python:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
source /path/to/your/venv/bin/activate&lt;br /&gt;
python /path/to/your/script.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Make sure the .sh Script is set to be executable and test it. If that works then:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crontab -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@reboot /home/pi/start_my_script_forever.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will launch the script even without having to login.&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=637</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=637"/>
		<updated>2024-03-21T15:02:49Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
New things found out (21.03.24) - This PN532 Library works pretty well. You just have to make sure you are using the UART pins on the Raspberry Pico. This way you hould be able to connected at least 2 UART devices. https://github.com/insighio/micropython-pn532-uart/tree/main&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=636</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=636"/>
		<updated>2024-01-17T11:53:45Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* RTC Clock &amp;amp; 4 Digit Display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:RTC Wiring.jpg|| 200px]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:RTC_Wiring.jpg&amp;diff=635</id>
		<title>File:RTC Wiring.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:RTC_Wiring.jpg&amp;diff=635"/>
		<updated>2024-01-17T11:53:21Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=634</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=634"/>
		<updated>2024-01-17T11:52:21Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* RTC Clock &amp;amp; 4 Digit Display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:RTCDisplay.zip&amp;diff=633</id>
		<title>File:RTCDisplay.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:RTCDisplay.zip&amp;diff=633"/>
		<updated>2024-01-17T11:51:55Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=632</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=632"/>
		<updated>2024-01-17T11:49:41Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* OTHER INFO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
== RTC Clock &amp;amp; 4 Digit Display ==&lt;br /&gt;
&lt;br /&gt;
The RTC Clock is a DS3132 Module. It seemed to work with CircuitPython and their libraries. The 4 Digit Display uses on Data In Pin and Clock Pin. In the zip file the main code happens on the code.py file, where we set the datetime once, when connected to Thonny, and then display it on the screen.&lt;br /&gt;
&lt;br /&gt;
[[File:RTCDisplay.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=631</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=631"/>
		<updated>2023-12-18T16:20:14Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Joystick &amp;amp; Button Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC.&lt;br /&gt;
&lt;br /&gt;
The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=630</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=630"/>
		<updated>2023-12-18T16:20:07Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Joystick &amp;amp; Button Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC. The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|300px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Joystick.zip&amp;diff=629</id>
		<title>File:Joystick.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Joystick.zip&amp;diff=629"/>
		<updated>2023-12-18T16:19:58Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=628</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=628"/>
		<updated>2023-12-18T16:19:04Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Joystick &amp;amp; Button Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC. The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:joystickCustom.jpg|200px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:JoystickCustom.jpg&amp;diff=627</id>
		<title>File:JoystickCustom.jpg</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:JoystickCustom.jpg&amp;diff=627"/>
		<updated>2023-12-18T16:18:53Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=626</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=626"/>
		<updated>2023-12-18T16:18:26Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* INPUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Joystick &amp;amp; Button Controller ==&lt;br /&gt;
&lt;br /&gt;
A custom controller with Joystick and buttons. Acts like a keyboard/mouse on your PC. The Joystick moves the mouse and the buttons can be assigned to keyboard letters. This way you don't need to worry about the mapping in Unity or other projects.&lt;br /&gt;
It has a motor on the back that can produce haptic feedback. May need to be refitted for different Joysticks.&lt;br /&gt;
&lt;br /&gt;
[[File:Joystick.png|200px|The Joystick]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:joystick.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=625</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=625"/>
		<updated>2023-12-05T15:22:52Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* Gyroscope Sensor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:Gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Gyroscope.zip&amp;diff=624</id>
		<title>File:Gyroscope.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Gyroscope.zip&amp;diff=624"/>
		<updated>2023-12-05T15:21:54Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=623</id>
		<title>Physical Controllers</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=Physical_Controllers&amp;diff=623"/>
		<updated>2023-12-05T15:19:23Z</updated>

		<summary type="html">&lt;p&gt;Georg: /* INPUT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Most of these sensors are already available as a EGC kit!&lt;br /&gt;
&lt;br /&gt;
This means that you get the full kit with all the components and just need to solder them to the board. The code used in the example is also provided. For more information - please inquire with Georg.&lt;br /&gt;
&lt;br /&gt;
= INPUT =&lt;br /&gt;
&lt;br /&gt;
== Microphone Sensor ==&lt;br /&gt;
&lt;br /&gt;
Using a Raspberry Pi Pico with Micropython - Takes a Microphone input and then outputs a gradient on LEDs.&lt;br /&gt;
This could be of course also be used for a sound sensing controller - move the player only when you make a sound or so.&lt;br /&gt;
&lt;br /&gt;
[[File:MicrophoneSensor.PNG|thumb|EGC Microphone Sensor Kit]]&lt;br /&gt;
&lt;br /&gt;
'''The wiring:'''&lt;br /&gt;
&lt;br /&gt;
[[File:VolumeSensor bb.jpg|300px|Wiring in Fritzing]]&lt;br /&gt;
&lt;br /&gt;
'''On a breadboard:'''&lt;br /&gt;
&lt;br /&gt;
[[File:Microphone.jpg|300px|Microphone Wiring]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lautstaerke.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Infrared Sender/Receiver ==&lt;br /&gt;
&lt;br /&gt;
Using an IR Receiver Module &amp;amp; Infrared LED, works pretty easily - with the right library.&lt;br /&gt;
&lt;br /&gt;
Some things to watch out for - the Infrared LED requires a lot of current (mA), the Raspberry Pico as well as the Arduino can't supply that directly. That's why we use a transistor as a switch to turn on/off the LED - this way we can get the full range and power for the LED. &lt;br /&gt;
&lt;br /&gt;
You will need to upload the ir_tx and ir_rx folder to the Raspberry Pico beforehand.&lt;br /&gt;
Works like a typical TV remote, can send small packets of data (like numbers or hex codes).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IrSendReceive.PNG|thumb|EGC Infrared Sender/Receiver Kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:IRSenderReceiver bb.png|300px|Infrared Wiring Fritzing]]&lt;br /&gt;
&lt;br /&gt;
[[File:InfraredBoards.jpg|300px|Infrared Wiring Breadboard]]&lt;br /&gt;
&lt;br /&gt;
The code for the Raspberry Pico and library that needs to be uploaded to the Pico here: [[File:IrSenderReceiverDoc.zip]]&lt;br /&gt;
&lt;br /&gt;
Pin 16 - IR Receiver, Pin 17 IR Sender (for our Kit)&lt;br /&gt;
&lt;br /&gt;
== Hand holding sensor ==&lt;br /&gt;
&lt;br /&gt;
Measure the voltage - could be a chain of humans that hold hands, Arduino measure the voltage and smoothes it out with a capacitor.&lt;br /&gt;
The LED is just to show the difference in voltage:&lt;br /&gt;
&lt;br /&gt;
[[File:ArduinoHumanChain.jpg|400px|The Arduino connects to 5Volts, Ground and Analog 0]]&lt;br /&gt;
&lt;br /&gt;
The Arduino connects to 5Volts, Ground and Analog 0&lt;br /&gt;
&lt;br /&gt;
[[File:BreadboardHumanChain.jpg|400px|The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.]]&lt;br /&gt;
&lt;br /&gt;
The Breadboard, purple wires are for holding in your hands. Capacitor to smooth out the voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
[[File:Touch.zip]]&lt;br /&gt;
&lt;br /&gt;
== RFID Tag Reader ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Can be used to read RFID Cards/ or write to them.&lt;br /&gt;
Uses a ~3 Dollar RFID Reader (RC522)&lt;br /&gt;
Made to work using Circuitpython and a library. Available as a kit (with extra Neopixel and Beeper for convenience).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Rfid_Raspberry.png|200px|RFID Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:Rfid_Raspberry.zip]]&lt;br /&gt;
&lt;br /&gt;
== Crowtronica ==&lt;br /&gt;
&lt;br /&gt;
Can use croco clamps to connect to metal, plants, fruit, etc.&lt;br /&gt;
Measures simple button presses basically. Can output keyboard button presses - use this in conjunction with Unity or an online piano tool to play sounds. The code provided gives basic functionality, you can press on the metal crows in the front to trigger keyboard presses. With the latest code (25.10.23) you get three leds per pad - depending on strength of the press you get different values.&lt;br /&gt;
&lt;br /&gt;
[[File:Crowtronica.png|200px|The Crowtronica]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:crowtronica.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gyroscope Sensor ==&lt;br /&gt;
&lt;br /&gt;
To be added - code already here for later reference.&lt;br /&gt;
[[File:gyroscope.zip]]&lt;br /&gt;
&lt;br /&gt;
= OUTPUT =&lt;br /&gt;
&lt;br /&gt;
== Musicplayer with DFPlayer Mini ==&lt;br /&gt;
&lt;br /&gt;
A simple module that allows to connect a SD card with mp3/wav files and play them via a small speaker.&lt;br /&gt;
&lt;br /&gt;
Uses the 5 Volt USB Input that feeds the Raspberry Pico (3.3V) in order to get a louder sound.&lt;br /&gt;
&lt;br /&gt;
For more volume, a dedicated amplifier and speaker would be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:AudioPlayer.PNG|thumb|EGC Audio Player Kit]]&lt;br /&gt;
[[File:DFPlayerRaspberryPico bb.jpg|200px|Audio Player Wiring]]&lt;br /&gt;
&lt;br /&gt;
The Code:&lt;br /&gt;
[[File:DFPlayerRaspberryPico.zip]]&lt;br /&gt;
&lt;br /&gt;
== SD Card Reader ==&lt;br /&gt;
&lt;br /&gt;
Enables you to write/read to an SD Card. This particular SD Card adapter needs 5V, so we take this from the VBUS of the Raspberry Pico.&lt;br /&gt;
Script to access storage can be found on the zip file beneath. Formatting the SD Card to FAT32 using the Tuxera SD Card Formatter, although your operating system may have a built in solution.&lt;br /&gt;
&lt;br /&gt;
This particular diagram &amp;amp; kit have an extra OLED screen and LEDs. These are optional but likely helpful to visualize what is going on and what the contents of the SD card are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:SdCard.PNG|thumb|EGC SD Card Reader Kit]]&lt;br /&gt;
[[File:SDCardReader bb.jpg|200px|SD Card]]&lt;br /&gt;
[[File:SdCardMicropython.zip]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display with 8x8 LED Neopixel Matrix ==&lt;br /&gt;
&lt;br /&gt;
This is using an affordable Neopixel Square for around 8 Euros. (8x8 Matrix mit 64 WS2812 5050 RGB LEDs)&lt;br /&gt;
The great thing is that we can actually load in image files to this using a simple library.&lt;br /&gt;
&lt;br /&gt;
[[File:DrawingBird.PNG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:BirdMatrix.jpg|400px|a bird shown in the 8x8 matrix]]&lt;br /&gt;
&lt;br /&gt;
This is the simple code to use - the main.py script opens the image on the Raspberry and sends it to Pin 16 (where the Data Pin of the Matrix is connected).&lt;br /&gt;
[[File:NeopixelMatrixEGC.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:16x16Matrix.jpg|400px|a bird shown in the 16x16 matrix]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gets trickier with a 16x16 Matrix - this were just strips of 16 leds connected to each other, the indeces were arranged like a long snake - therefore in the code some rearranging was necessary.&lt;br /&gt;
[[File:Neopixel16x16.zip]]&lt;br /&gt;
&lt;br /&gt;
== Stepper Motor ==&lt;br /&gt;
&lt;br /&gt;
Using a A4988 Stepper Motor Driver, Arduino and a Stepper Motor from StepperOnline ( Nema 17 Bipolar 42Ncm 1.5A ).&lt;br /&gt;
Setup the Driver as in this diagram [[File:POLOLU-2128.pdf]], using this video tutorial: https://www.youtube.com/watch?v=psI3aN0A-OA&lt;br /&gt;
&lt;br /&gt;
Be sure to use a capacitor to avoid electricity to leak back into the Arduino and make sure to set the current limit on the Driver as described in the stepper driver document. For me it was 0.6v as I wanted a maximum of 1.5 A of current through the Stepper. &lt;br /&gt;
&lt;br /&gt;
Arduino code was here: [[File:StepperCode.zip]] &lt;br /&gt;
&lt;br /&gt;
[[File:StepperMotor.jpg|200px|Stepper Motor with Arduino]]&lt;br /&gt;
&lt;br /&gt;
== Multi Transistor ==&lt;br /&gt;
&lt;br /&gt;
Used to turn off/on up to 12 devices. These could be things that require a larger amount of current to work (such as oldschool bycicle lightbulbs).&lt;br /&gt;
&lt;br /&gt;
We use MOSFETs for this, which are essentially just transistors (can be used as electronic switches). You can also lessen voltage using a transistor and PWM (see script attached). So you could have a 5V input (from USB Power which is a pin on the Raspberry Pico) and then reduce it down to 3v using this.&lt;br /&gt;
&lt;br /&gt;
Additionally, this board has the capabilities to have an IR Receiver and IR Emitter. So you could use an IR remote to control these devices too.&lt;br /&gt;
&lt;br /&gt;
[[File:MosfetPCB.png|thumb|Multi Transistor kit]]&lt;br /&gt;
&lt;br /&gt;
[[File:Mosfets.jpg|300px]]&lt;br /&gt;
&lt;br /&gt;
= OTHER INFO =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SEEDUINO XIAO ==&lt;br /&gt;
&lt;br /&gt;
A super small Arduino/Micropython device. About 15 Euros.&lt;br /&gt;
&lt;br /&gt;
[[File:Seeduino.jpg|200px|Seeduino]]&lt;br /&gt;
&lt;br /&gt;
Connecting it to Arduino IDE: https://wiki.seeedstudio.com/Seeed_Arduino_Boards/&lt;br /&gt;
&lt;br /&gt;
Unfortunately did not work the first time I used it, may just have been a faulty device..&lt;br /&gt;
&lt;br /&gt;
== Reading Serial Data in Unity ==&lt;br /&gt;
&lt;br /&gt;
In order to read data from Arduino to Unity, you can simply print out text to the Serial port. Then receive this in Unity with this script:&lt;br /&gt;
&lt;br /&gt;
[[File:SerialReader.zip]]&lt;br /&gt;
&lt;br /&gt;
Important that the Serial Monitor is not open when trying to read. May require plugging in/out the USB sometimes. Also, you need to set the correct Port (COM + Number).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deep Sleep with Raspberry Pi Pico ==&lt;br /&gt;
&lt;br /&gt;
Custom Firmware reduces power consumption to ~2mA, which is excellent for battery powered projects that need long durations where they don't do anything.&lt;br /&gt;
https://ghubcoder.github.io/posts/deep-sleeping-the-pico-micropython/#release&lt;br /&gt;
&lt;br /&gt;
[[File:MicropythonDeepSleep.zip]]&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
	<entry>
		<id>http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Rfid_Raspberry.zip&amp;diff=622</id>
		<title>File:Rfid Raspberry.zip</title>
		<link rel="alternate" type="text/html" href="http://wiki.experimentalgamecultures.uni-ak.ac.at/index.php?title=File:Rfid_Raspberry.zip&amp;diff=622"/>
		<updated>2023-11-27T16:21:07Z</updated>

		<summary type="html">&lt;p&gt;Georg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Georg</name></author>
	</entry>
</feed>