Saturday, 21 January 2017

Twitch Switch - Part 3

Load the Code


If you have made it this far you should be admiring your newly constructed Twitch Switch. Now we need to add the brains to this beauty.

First, download the Twitch Switch Software by clicking the link.

Uploading the program to the Teensy LC board at the heart of the Twitch Switch will require two pieces of software:

1 - Arduino IDE: This is the standard software used to program the Adruino family of microcontroller boards. If you are an Arduino user, you probably have this already on your PC. If not, follow the link to visit the website.

2 - Teensyduino Add-On: This is a software add-on for the Arduino IDE that adds the extra functionality needed to program the Teensy series.
NOTE: Check the information on the Teensyduino download page to find the latest supported version of the Arduino IDE. Sometimes it takes a while before new versions are supported so you may need to use an older version of the Arduino software for this to work.

Now, install the Arduino and Teensyduino software and upload the Twitch Switch program. Watch this video for a step by step guide.

3 comments:

  1. I just followed your excellent video on this, but I get these errors when compiling the sketch:

    Twitch_Switch_v1_0.ino:46:20: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] (my note: MANY of these lines)
    Twitch_Switch_v1_0.ino: In member function 'byte Button::Check()':
    Twitch_Switch_v1_0.ino:152:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    Twitch_Switch_v1_0.ino: In function 'byte setMode()':
    Twitch_Switch_v1_0.ino:240:1: warning: no return statement in function returning non-void [-Wreturn-type]
    Twitch_Switch_v1_0.ino: In function 'void edit1()':
    Twitch_Switch_v1_0.ino:326:14: warning: statement has no effect [-Wunused-value]
    Twitch_Switch_v1_0.ino:259:8: warning: unused variable 'editStep' [-Wunused-variable]

    Using Arduino 1.6.5-r5 and the latest (per today) installer from PRJC.

    Everything is set up exactly like you show in the video :/

    Any ideas?

    ReplyDelete
  2. Digging a little.. the warning can apparently be ignored, but there is a typo in your code.. line 325: edited == true; .. should be " edited = true;" .. or the line could simply be removed, as the edited variable isn't used anywhere.

    line 323: byde mode() should be changed to void mode(), sice this function doesn't return anything..

    Did you by any chance change the sketch between making the video and uploading the code as you should at least have gotten the warning about unused variables?

    With my fixes above, the code at least responds to button presses now.. The warnings about conversion of strings can apparently be ignored. I can't test reprogramming mode until I actually get some buttons soldered onto the board.

    Cheers!

    ReplyDelete
  3. i will use 12 buttons...what i have to do ?

    ReplyDelete