communication_ss_r250n
Table des matières
Communiquer avec un Tascam SS-R250N
Processing
import processing.net.*; Client c; String inString; void setup() { size (300, 150); c = new Client(this, "192.168.1.101", 23); String mdp = "z"; c.write("\r\n" + mdp + "\r\n"); } void draw() { if (c.available() > 0) { background(0); inString = c.readString(); println(inString); } } void keyPressed() { c.write("012\r\n"); // Envoi la commande lecture }
Plugin Lua pour GrandMA2
local socket = require("socket.core") local host = "192.168.1.205" local tcp = assert(socket.tcp()) tcp:connect(host, 23) tcp:setoption('tcp-nodelay', true) tcp:settimeout(1) local sres, serr = tcp:send('\r\nabcdef\r\n') gma.echo("Send:", sres, serr) function lecteur(commande) if commande == 'play' then sres, serr = tcp:send('012\r\n') end if commande == 'suivant' then res, serr = tcp:send('01A00\r\n') end if commande == 'stop' then res, serr = tcp:send('010\r\n') end gma.echo("Send:", sres, serr) end return lecteur
communication_ss_r250n.txt · Dernière modification : 2021/12/23 06:51 de Mushussu