• Hi - I was on holiday last week, hence the lack of replies.

    While it's unlikely to be your problem, you'd want to remove integer= from your code, as that's not doing what you expect :)

    SPI.setup might be resetting pin states to their default values which would throw things off - you could try a slightly hacky method of just updating the software SPI values directly:

    var spi = new SPI();
    spi.setup({sck:B6, miso:A6, mosi:A7, mode:integer=0, order:'msb'});
    digitalWrite(SS, 0);
    d = spi.write(0b01000100);
    digitalWrite(SS, 1);

    Otherwise I'd say to just manually create the waveform using for loops and digitalWrite. Some kind of oscilloscope would probably really help you do see what's going on though.


Avatar for Gordon @Gordon started