Outils pour utilisateurs

Outils du site


communication_ss_r250n

Ceci est une ancienne révision du document !


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

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

Spécifications pour Telnet et RS232

communication_ss_r250n.1640238589.txt.gz · Dernière modification : 2021/12/23 05:49 de Mushussu