Hi,
For my projects I use a script/script2 object with this code edit inside:
// FOUR 74HC595 SHIFT REGISTERS
// by paul
uint8_t *txbuf;
void setup(void){
static uint8_t _txbuf[32] __attribute__ ((section (".sram2")));
txbuf = _txbuf;
}
void loop(void){
spiSelect(&SPID1);
txbuf[0] = (in1>>24); // SHIFTREGISTER 1
txbuf[1] = (in1>>16); // SHIFTREGISTER 2
txbuf[2] = (in1>>8); // SHIFTREGISTER 3
txbuf[3] = (in1); // SHIFTREGISTER 4
spiSend(&SPID1,4,txbuf);
spiUnselect(&SPID1);
chThdSleepMilliseconds(1);
}
Can someone do a single object with that? It needs only one inlet.
My objects will work for everybody without the need to copy this code in a script.