ofxArduinoDjShield – Use Dj Shield with Openframeworks (C++)

Store Forums DJ Shield Discussion and Project Ideas ofxArduinoDjShield – Use Dj Shield with Openframeworks (C++)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #747
    fluaten
    Participant

    Hi,

    I just publish a way to use easily the DJ Shield with Openframeworks.

    As an addon to use with it. You can find the code here :

    https://github.com/fluaten/ofxArduinoDjShield

    ## USAGE:

    – Get an Arduino Uno, Duemilanove, Mega or Leonardo http://arduino.cc/en/Main/arduinoBoardUno

    – Upload StandardFirmata on the arduino :

    Open Arduino app (preferably Arduino 1.0) and
    navigate to File -> Examples -> Firmata and open StandardFirmata.
    Compile and upload StandardFirmata for your board, then close
    the Arduino application and run this application.

    – Get a DJ Shield for Arduino : https://nootropicdesign.com/djshield/

    – Add to your code :

    in __ofApp.h__ add :

    #include “ofxArduinoDjShield.h”

    and after “public:” :

    ofxArduinoDjShield DjShield;

    ===
    in __ofApp.c__ add :

    – in setup() { }

    DjShield.setup(“/dev/tty.usbmodem1411”);

    /*
    Replace the string below with the serial port for your Arduino board
    you can get this from the Arduino application or via command line

    For OSX, in your terminal type “ls /dev/tty.*” to get a list of serial devices
    */



    – in update() {}

    DjShield.udpate();

    then use :

    bool DjShield.bSetupArduino // if arduino ready

    // Potentiometers A0-A2
    float DjShield.PotA0(); // native, from 0 to 1
    float DjShield.PotA1(TRUE, 0,255); // rescale from 0 to 255
    float DjShield.PotA2(TRUE, 0, 10); // rescale from 0 to 10

    // Buttons D2-D6
    bool DjShield.ButtonD2();
    bool DjShield.ButtonD3();
    bool DjShield.ButtonD4();
    bool DjShield.ButtonD5();
    bool DjShield.ButtonD6();

    // LED A4-A5
    DjShield.LedA4(true);
    DjShield.LedA4(false);
    DjShield.LedA5(true);
    DjShield.LedA5(false);

    You can also go to https://github.com/fluaten/ofxArduinoDjShield/releases to download the app “Dj shield to osc (bridge) 0.1” (Mac OS)
    Edit settings.txt for option and config

    #2152
    Michael
    Keymaster

    That’s really cool — thanks for that contribution!

    #10958
    Anonymous
    Inactive

    Replace the string below with the serial port for your Arduino board
    you can get this from the Arduino application or via command line. 500-240 dumps

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.