Skip to content

SurreyEARS/CardboardRobotWars

Repository files navigation

Cardboard Robot Wars

Similar to the competition created by Columbia Gadget Works, this competition involves putting robots made out of cardboard head to head to find a victor.

Instructions on Setting up a Working Cardboard Warrior

  • Connect RaspberryPi via USB to a computer via the micro-USB port masked "USB"

    • follow instructions on the following link to set up raspberry pi: https://www.youtube.com/watch?v=xj3MPmJhAPU&vl=en-GB [1]
    • see the wpa_supplicant.conf file in the "Installation Files" directory of this repository for an example of something that works. Don't forget to change the network name and password. This should be the same on all of the Pi's.
  • Loading & Running Software

    • use CyberDuck or other SFTP protocol (via cli or gui) to transfer the following files onto the pi:
      • cardboardFighter.py -> from Software directory
      • gpiotest.py -> from rpi-giotest-master (https://github.com/kgbplus/gpiotest [2]) -> this file is for manually debugging and watching the gpio pin outputs
    • N.B.: It's easy to just place all the files in the home directory so you can run things quickly
    • ssh into the rpi:
    • to debug run the following command in shell first:
      • sudo python gpiotest.py
    • to play type:
      • python cardboardFighter.py

Stuff to do

  • Build robot
  • Test
    • test cardboardFighter.py with physical electronics (already tested with GPIOTEST.PY pin monitor)
  • Prep for comp
    • create skeleton code that allows them to fill in blanks from cardboardFighter.py
    • Design a competition arena (and create a cool name for it)
    • Create a set of competition and build rules
  • If time exists implement a circular buffer for input handling and fill on interrupt to make things more responsive
  • run comp

Notes for future improvement

  • Polling is bad - do things in an interrupt driven manner. It wasn't done this time as an artefact of previous examples from instructable example (see ref [3]).
  • Get XBOX controllers working
  • Rebase this to Arduino to get rid of asynchronies in PWM signals - or do this with an rPi with a manually created PWM so that processing time is synchronous with clock (python's GPIO libraries have inbuilt inconsistencies due to no-op implementations so your 80% duty cycle may not be exactly 80%).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages