Serialosc for non-monome hardware?

  • Is it possible and/or has anyone used serialosc/zeroconf stuff to do OSC over USB without using serial objects in Max?

    I've been working on this sensor-based system that's actually working quite well at the moment, but I've had some bad times with the serial object in Max crashing my computer hard in the past, so I'm curious if I can somehow just do what the monomes are doing and use udpreceive/udpsend the same way.

    I'm basically sending raw bytes of sensor data which are being combined in Max into 10/12bit sensor streams.

  • I'm not sure understanding.
    Arduinome with analog inputs for example.
    This is the kind of things you want to test?

  • No monome at all.

    Basically connecting an Arduino via USB and sending sensor data to udpreceive in Max using serialosc/zeroconf.

  • Although thinking about it an Arduinome is just that, except it sends monome specific messages.

    I took a quick look at the Arduinome firmware, and man is it long! It also runs at 115200 whereas my XBee/transmitters are running at 57600 (I was getting buffer overflow problems at 115200 before).

  • Wow:Too complicated for my little head!!!

  • A couple different solution for your problem. You could do all the serial communication in another app, and then transmit from there (essentially your own serialosc)... something like node.js or processing or whatever

    If you are working with an uno it might be possible to have the uno act as a usb midi device... and just send the information as midi messages.

    In regards to the firmware... the xbee is communicating with the arduino using one serial port, and the arduino is communicating with the computer using another... so that may not even be a problem.

    Care to share a bit more info and maybe some code?

  • Ideally it would all be self contained just to make the running of it streamlined.

    I had forgotten about the newer Arduino device spoofing. MIDI is a pretty low baudrate though isn't it. 31250 or so. I guess that's not that different from 57600 but I don't know if that would muck up data throughput.

    I've got a spare Mega sitting around, which has multiple physical serial ports.

    Here's the Arduino code:

    // i2c Arduino Library
    #include

    // 0011110b, i2c 7bit address of HMC5883
    #define address 0x1E

    // Define sensor variables
    int AccX;
    int AccY;
    int AccZ;
    int GyroX;
    int GyroY;
    int GyroZ;
    int SW1 = 9;
    int SW2 = 10;

    #define aX A0
    #define aY A1
    #define aZ A2
    #define gX A6
    #define gY A7
    #define gZ A3

    // Incoming serial byte
    int inByte = 0;

    void setup() {
    // Start serial port at 57600 bps:
    Serial.begin(57600);

    // Set incoming switch mode
    pinMode(SW1,INPUT);
    pinMode(SW2,INPUT);

    // Start i2c communication
    Wire.begin();

    // Put the HMC5883 IC into the correct operating mode
    Wire.beginTransmission(address); //open communication with HMC5883
    Wire.write(0x02); //select mode register
    Wire.write(0x00); //continuous measurement mode
    Wire.endTransmission();

    // Send a byte to establish contact until receiver responds
    establishContact();
    }

    void loop() {
    // Define variables for magnetometer
    int MagX,MagY,MagZ;

    // Tell the HMC5883 where to begin reading data
    Wire.beginTransmission(address);
    Wire.write(0x03); //select register 3, X MSB register
    Wire.endTransmission();

    // If we get a valid byte, read analog ins:
    if (Serial.available() > 0) {
    inByte = Serial.read();

    AccX = analogRead(aX);
    AccY = analogRead(aY);
    AccZ = analogRead(aZ);
    GyroX = analogRead(gX);
    GyroY = analogRead(gY);
    GyroZ = analogRead(gZ);

    // Read data from each axis of magnetometer, 2 registers per axis
    Wire.requestFrom(address, 6);
    if(6

  • This is the main bit of the Max code (there's plenty calibration/etc.. after this):

    ----------begin_max5_patcher----------
    3843.3oc6cs0iqaaD94c+UvZz9T2yBQRQQoh7xl1h9RCPQBZ5kjfCzZq0V4H
    K4ZIeth7euhjRxR1Rji8ZKycONA3r5hs7vu4BGNyvQe41al7X1Gixmf9SneB
    cyMe41atQdIwEto57alrL7iSSBykerIOkjktY4j6T2p7v3zjnB48vUWrXcbX
    57jHw0bpt1SYoE4weVdML4dmse+rME0O.R0UUWp3SqhTTl3GMrXxcnIOV9fm
    f9kpOW7LIIk83u9F2ZJZUXwzEwoye65noEpuN1geOFSY9d2gHA36odLLmdGh
    4bumOlxKupy8NMOUAolFtT9aO4gxwRx1m85xqWDs9sQogOVM.E252t8Vw+bG
    PLbZ1xkQoE0O1hnOJozIeW3bDB8eEGpCeAgkN6iQLMXDidOywEyTHjGwuDvJ
    QnfxmtQz4ji.+myEB3ACA3i.BXo5Qbn5Q7N5QTOB2cz0irTLzGJFxrdaQ+6y
    klX.LMQ1VMQO5HaK56e3eg9wG96+y+5OXDAdJbZzPnhfhghJXGcvBV..XGG4
    ebIR3H3qECSXvZUTKVq5u8o0YmwY3w.UqnWvo3UPvYaJdhCLH.+06b7DLTUI
    70I4GDDI.AQbf0aO5rMKOwEjxH9RtjiGlNMJ47YRl.aUW3uhWyAwCppD2BTk
    rUPD5J2v17pNTJimOmC7goLxt31iNaljov7OBS+50dDkBUUZmkZf4dt3QWWJ
    M5CkT8dxQqP4Qs+45.ujCAJwNCgkwoRj7X+S+KziqaQLtbgrnmbwuXO98rC.
    tKeXQqq.xJjr7KDmD89n04wYosj6tYR3pUst7Ms9JB3+WyjOHu6ZtTbp5RNM
    WZcz6iq+9L0EKYp2Vey5QD2ULVbcUKtOPpqwcvaGSk7+4IYSeWzr1O+IYqhR
    iSWsNJuzJRXQ0OTysmE8T3ljh21OGt68qCeQu2rWz7lIyWGOKKUPDc9lhKW+
    yUprvjiJV6Ai7SjFtpmubd43XS9igqE.WkFAo9lEYYIcuUCupT+HLMdYXQTQ
    7xpftz7PiWtZsPdq8OjRgaQ9z0YIIcdTp679dtyrR14znODOqXg7Y0FJK+3w
    qpYASZvnYwyixK5dshv44cuRmTvzVNqshemqqcljtVAllDEtF84Dz70YaV09
    izm4VM1DFd1k8RECq8OSelP88DhETpTW1eu35oaFlapsOVoNcFfrRBMa4ikj
    LJI6Ce6mJhPgoyPKhmuPdRorTFJDkGKlVB89vjMQseLIwoke+MJANxXf2XSv
    MWhvtLpxnoz1I0cTw6NyQ0Et+iCJTRNFPpMx167UcF084.8P3HWYolw7k+w+
    BH1pAF+luA4aKHoOPjjHwPJytPRaQfDaRw1Kv6p.IHARf.4U4QsxitlfQr+U
    4QPHoGPj7p.oNXjZ.EYtNWkGAYej.DIuJOpEFMYfzU468UARiHICHRdUfTGL
    ZRdj5ecEMf.RNPf7p3nNTzzxBoNWWOCL+Gc.hjWkG0BilbfjPttfFXHIGHRd
    UfTKLZxBIlccEMvbfzCHRZmBjaRWEN8cHGX++oMqNDGSf9c1veFjyG.iy6FH
    cYi6IOif0w5+wn0yBSCOkLeEvBhyAJIPTBPAdUBlIr5+syntNsXx7SZyiVWf
    y275Xz5AzcuWGiVnK150wn0GXjNdcLZC.FnwWEiVWGfg4+0wnEZ5JecLZI.y
    w8EYztLJOObdTu9V94DYMAMhNpOruZTiUJjpXU77TUvhr.V7sEuzWEuJBwbb
    rBnzjsFLgqJ5JYU.w310BdJPOhLIXdbqlQGZJq.361pRL35xMMsEQUhzXufs
    Ump8.tqPaJsxr4zJlpEXEfZUUWNTD0MFwHtBEo3CSdc2m51J9sK5MXk+NT0+
    tyWuup.dfJAdnpAtSEAuSUA65qFwdp+nl5jJJbx1.P+kFLfxCFRIBarLgAVp
    vZJWXXkLrgxF1XoCan7gMVBwCUFw5KkX8kSr9RJVaYEOToE2e4E2eIFuqv7t
    VY169Fqe1cL4jsZSRnnzYU1dPeHtXApXQT0lR.sJacAZ5hrxwet35onoIY4Q
    n4keocepCURsZmhvf0L8d5oq.xFzgOZcfjD9nv5qHaMMMPmoB5Ncvykgs2zC
    c4W8A6CMGwgir6xVz6VydtZSAf9p38P7TVOHA8Mcg8B+qKQjHoNw4iIPLxDt
    y.ifBgQfoUYkfLrqP1Ki3yIn3hn0HrMyG5TcLF3ChsLqLZ2ur3CEHGjb9VjZ
    Crnme7rL66ZheTkzA0z+2UskZ5KMDZqGL8Ft7TLqWZrobIn7Dpzc4nzYn+P9
    4iM87lCw+.rboVwAF6+BiWDkfVGEN6BZ4pd8zZYE3CfWfcwCmn6KHqPBnZA5
    movbm8lbuqe9.bJhLbDHGNJjujQO8Hm6AH+oRrlEgc6EGaylYAuJGND+JDsf
    Cw+48UG53AVii5vNQ.S2XfHVHrgkwKoIwmSOpkmsY8zZ0kpIHQ6SlyhxKhSa

  • (second half)


    hdzOscAYH7de3EwylsejYTAqHWDFjYMc3fCVL3XGVBkcviKb+ffUNtnGv3h3
    9hYb4dHiKgF4KjwEseUl9GWubDCEqDEL6hRe4LtDZLjykX3x3YqxJW2Tdcl4
    buG6U9eth3dS25xVmSHp5UipZ4IA8EYwKLdAU7lydYIGbPSK9BZbQOWiqcku
    Usom.9V4WwwVj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2vc8u6C0uyCmz98XY6WN5p
    M4uS+cIkNadulWXy89RVW+yY22hl3lmz.cfkCDz5tog2tgg+yhVMoniekWD1
    7pgqePseIr92XiCgldsPANWKZx0.lFdLCJetOLeDPY6tXZ+HU6tW52lrIpHK
    qXwa9G+kGdyO7ozsstzs256xlEsbqnXuseTX3OUmr9tsbzg3RXl+V7stEwOH
    ehpgQIhiAFSY9d0un956wc.7KfpExGc2c2ph0t6jMUL3d7NsSgCBYFlVytTS
    l6MyxdhZGF8vMPO7Qld7MPOtiL83Xfd599gXDHHrABhL1bLhIBxajIHpIBhL
    xDjqIBBOxDDy.AgGaqPAlHH9PpYNmAJhBPueWkwyJE0s5LzRQGCFolZam2d7
    BhYm2V767Vhe22N7kOse61+uQQATo
    -----------end_max5_patcher-----------