• alexandros

    What does Arduino's power supply have to do with the current the relay will let through or not? A relay is an electronic switch which receives power (usually of high voltage) and has three more pins, one for 5V, one for ground, and one to control the actual switch. These three pins are the ones you connect to the Arduino, and Arduino's 5V pin is more than enough to power the digital part of the relay. The high voltage the relay will let through or not has nothing to do with Arduino's power supply and digital control.

    Don't know what you're trying to do, and can't really understand the conversation, but thought I post these couple of things I know about relays.

    posted in I/O hardware diyread more
  • alexandros

    Why would you damage the boards? I don't think relays have changed in the way they work, since 2011. What is this that you find and don't trust?

    posted in I/O hardware diyread more
  • alexandros

    Try this:

    [phasor~ 1]
    |
    [threshold~ 0.1 10 0.1 10]
                             |
                            [o]
    

    The bottom object is a bang

    posted in technical issues read more
  • alexandros

    My suggestion was for when you boot up the Pi only. If you're opening Pd patches through Python, you should replace the command that launches Pd with a command that launches your Python script and open Pd from there. In that case you don't need to wait 30 seconds every time, only at boot time for the Python script to launch.
    But why do you have to quit Pd and restart it? Can't you just close the patch and open a new one? There are internal messages in Pd that can do that.

    posted in technical issues read more
  • alexandros

    Using controller names like 'Pure Data' instead of 20, is more consistent, since these numbers are subject to change, depending on when you plug in a device, so I suggest you go for the names of the controllers and not their values.
    You can do the following in a file:

    #!/usr/bin/sh
    
    pd -nogui -alsamidi -otherflags &
    sleep 3
    aconnect 'Controller':0 'Pure Data':0
    aconnect 'Pure Data':1 'Controller':0
    

    This will automate the process of launching Pd and connecting it to your controller via ALSA MIDI.

    Then you can run this script from crontab. Type crontab -e (if it's the first time you edit crontab you'll be asked to choose an editor and will be prompted to use nano - I suggest using that if you're not familiar with other editors like vim) and at the end of the file type:

    @reboot sleep 30 ; sh /path/to/your/script/script_name.sh
    

    This will launch your script 30 seconds after the system boots.

    posted in technical issues read more
  • alexandros

    You can try this out:
    launch Pd with -alsamidi
    typing in a terminal aconnect -lio will give you a list of all MIDI devices
    find your controller and Pd's MIDI input port and type
    aconnect 'Your Controller Name':0 'Pure Data':0
    Note that if your controller is not a single word, you need the single quotes, the same way 'Pure Data' is written. 0 is your MIDI controller's output port and Pd's input port. These depend on your system, so make sure you fill in the correct numbers there.

    check in Pd that you get input from your controller, it should work.

    posted in technical issues read more
  • alexandros

    Glad you found it useful!

    posted in technical issues read more
  • alexandros

    @LiamG have you benchmark tested the CPU consumption of 50 sine waves? Cause [osc~] is a table look-up oscillator and it shouldn't consume too much CPU. If Pd can't handle 50 table look-up oscillators, then it's probably no good.
    Haven't done this benchmark test, but I'm pretty sure it shouldn't be a problem.

    posted in technical issues read more
  • alexandros

    What if one of the values you send with Serial.write() get the value 10 or 13? Your system will get confused. You need to work on this system a bit more. You can use the [serial_write] and [serial_print] abstractions I've made which you can find here. Mind that in some systems (mine, for example), [comport] reads a 10 when the Arduino sends a 13. I have made a fix for this for the [serial_print] abstraction, which is the [serial_print13] abstraction, haven't made a fix for [serial_write] yet. Still, it's very likely you won't have that problem. Read the README.md file.

    For more in-depth information on how to build such a system, you can also read my "Arduino for Pd'ers" tutorial, which you can find here, under "Tutorials". Though this tutorial was written before I made the [serial_*] abstractions and it's a bit more technical on how the whole mechanism works.

    posted in technical issues read more
  • alexandros

    You can also use Pd's native objects, [oscformat], [netsend -u -b], [netreceive], [oscparse], no need for external libraries.

    posted in technical issues read more

Internal error.

Oops! Looks like something went wrong!