data communication (serial/spi/i2c)

63 views
Skip to first unread message

Karl

unread,
Jun 5, 2015, 6:53:37 AM6/5/15
to axolot...@googlegroups.com

I was wondering what would be needed to send some serial (or even spi/i2c) data from my teensy board to the axoloti.

I've set up the cabling for a simple tx>rx (both directions) already and

loaded the serial config object. Lets say I would just want to send a number or a boolean state.

What would be the next steps to make this happen? Are all of the necessary objects even made already?

If not what would they need to implement?

Johannes Taelman

unread,
Jun 5, 2015, 7:28:36 AM6/5/15
to Karl, axolot...@googlegroups.com
Hi Karl,

I believe the best approach for handling protocols is writing code rather than patching it visually. I think this is also true for Max and PD, don't know about Reaktor but I guess it is outside the scope of Reaktor.
I can imagine for instance a MIDI protocol decoder made out of primitive objects in PD or Max, but it would look more complicated than textual code.
So protocol handling is best done with a script2 object. This is a generic object that creates a thread outside the DSP thread where you can supply your setup and loop function like in Arduino*. Except you can have "multiple Arduino's". The hardware API is not Arduino compatible, but Chibios 2.6.x API. One day a wrapper could be implemented...

The weakness of script2 is that the number and type of in- and outlets can not be configured. This is perhaps an argument to change the object format and move inlet, outlet, attribute and parameter declarations XML fields of an object to doxygen-style annotations in c++.

You can find some examples using for serial, i2c and spi in patches/examples/io/...
I2C and SPI are bus masters, making bus slaves is a lot harder. I recommend serial/uart to communicate with a teensy.

* Wiring deserves the credit actually

--
You received this message because you are subscribed to the Google Groups "axoloti-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axoloti-user...@googlegroups.com.
To post to this group, send email to axolot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/axoloti-users/f176a5b7-79b1-4080-a596-27c74be09caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages