Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Connecting a Wii Controller to Raspberry Pi using Python

By Neha Rastogi

Brian Hensley, an engineer by profession, is an active blogger who has contributed a lot of DIY projects on his site. One of these mentions about combining a Wii remote with a Raspberry Pi with the use of Python. This was a part of a robot project that Brian intended to develop. In this project, he wrote a program and ran it on the Pi which allowed him to connect the Wiimote through Bluetooth after which he was able to control the data with the help of Python. 
 
 
 
Before starting the procedure, Brian acquainted himself with the know-how of connecting a Wii controller to a virtual PC. Then he used the Cwiid module to write a small program that could easily grab the data. Once the connection was established, he ported it to the Raspberry Pi. For this setup, he used parts like Raspberry Pi, Wii controller, Standard Raspberry Pi cables and a Bluetooth USB dongle. 
 
First and foremost, the project needed the latest version of Debian to be downloaded on the Raspberry PI. After ensuring this, Brian plugged the dongle into the USB port of the PI and installed the Bluetooth package which took around 1 hour. This time, the duration can be reduced by eliminating the use of GUI. When the Bluetooth connection was established, he scanned for devices and pressed 1+2 on the controller to put it in the discovery mode. 
 
After that, he downloaded and installed the CwiiD module that lets the user control a Wiimote in python. Then he wrote the required program into the directory and called it. At this point, he pressed 1+2 on the remote which finally connected the controller to the Pi. 
 
Now as the buttons are pressed on the remote, related information is displayed on the screen depending upon the instructions that you had set. Here Brian had set the centre point as Position 50 with limits from 0-100. As a result, when he pointed the remote horizontally in front of the screen and pressed the left and right buttons, the values decremented and incremented respectively from 0 to 100.
 
Moreover, when he pressed the buttons 1 and 2 individually, the information was displayed accordingly disclosing which button was pressed. Then he pressed the left and button 1 which said it’s moving backwards while pressing right button along with 2 said that it’s moving forward. He also set the instructions for minus button which produced a rumbling sound on being pressed. Lastly, the Bluetooth connection was switched off by pressing the plus button. 
 
Brian had prepared this project with the aim of connecting the Wiimote to his robot so that it could be controlled through Pi via Python. You can also develop this interesting project at home by referring to this video uploaded by Brian that reveals the demo of the project. 

Filed Under: Reviews

 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • PS2 Keyboard To Store Text In SD Card Using Arduino Circuit Setup On Breadboard
    How To Use PS2 Keyboard To Store Text In SD Card Using Arduino- (Part 42/49)
  • Wireless Path Tracking System Using Mouse, XBee And Arduino Circuit Setup On Breadboard
    How To Make A Wireless Path Tracking System Using Mouse, XBee And Arduino- (Part 43/49)
  • How to Make a Wireless Keyboard Using Xbee with Arduino- (Part 44/49)
  • Making Phone Call From GSM Module Using Arduino Circuit Setup On Breadboard
    How to Make Phonecall From GSM Module Using Arduino- (Part 45/49)
  • How to Make a Call using Keyboard, GSM Module and Arduino
    How To Make A Call Using Keyboard, GSM Module And Arduino- (Part 46/49)
  • Receiving SMS Using GSM Module With Arduino Prototype
    How to Receive SMS Using GSM Module with Arduino- (Part 47/49)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • Renesas delivers intelligent sensor solutions for IoT applications
  • Microchip Technology releases AVR-IoT Cellular Mini Development Board
  • Qualcomm acquires Cellwize to accelerate 5G adoption and spur infrastructure innovation
  • MediaTek’s chipset offers high-performance option for 5G smartphones
  • Nexperia’s new level translators support legacy and future mobile SIM cards

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Need help to identify Thermistor part number.
  • SRF04 module measure distance
  • Ansys Electronic Desktop (HFSS) file opening failed????
  • chebyshev sine approx
  • DC DC converter output voltage rise time

RSS Electro-Tech-Online.com Discussions

  • Control Bare LCD With ATmega328p
  • undefined reference header file in proteus
  • Help diagnosing a coffee maker PCB
  • Are Cross-wind compensation and Road crown compensation functions inputs to LKA function?
  • Interfacing ZMOD4410 with Arduino UNO
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering