To start, the follow the steps:

  1. Connect Augmented Ney to arduino
  2. Connect Arduino to Computer
  3. Upload Arduino code to Board
  4. Test Serial Port
  5. Close Serial Port
  6. Check Serial Port ID
  7. Open 140504InterafacingArduinoofxSimpleSerial
  8. Edit serial.setup("/dev/cu.usbmodemfd121", 9600);
  9. Open and start server JackPilot
  10. Check out the port that SuperCollider is listening (57120 or 57121))
  11. Open REACTTheGodArticle SuperCollider standalone application
  12. Open 140324TheGodArticle to test OSC messages
  13. Run the folling code to SuperCollider
(
~arduinoData.remove;
~arduinoData = OSCresponderNode(nil, '/arduinoData', { arg time, responder, msg;
    //[time, responder, msg].postln;
	~arduinoArray = msg.asString.split($,).postln;
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole1",~arduinoArray[1].asFloat.linlin   (0 , 60, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole2",~arduinoArray[2].asFloat.linlin(0, 60, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole3",~arduinoArray[3].asFloat.linlin(0, 60, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole4",~arduinoArray[4].asFloat.linlin(30, 60, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole5",~arduinoArray[5].asFloat.linlin(30, 60, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole6",~arduinoArray[6].asFloat.linlin(0, 35, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Hole7",~arduinoArray[7].asFloat.linlin(0, 50, 0.001, 0.999));
	NetAddr("127.0.0.1", 12345).sendMsg("/Arduino/Pressure",~arduinoArray[8].asFloat.linlin(37, 70, 0.001, 0.999));

}).add;
)
  1. Open The God ArticleDebug
Posted on .
blog comments powered by Disqus