/* NeoPixel data receiver connect the output of a neopixel stripe to D11 of an Arduino Nano This program will receive data transported in the last bit and display it as text 21.11.2021 chris_ */ // compiler flags changed to O3 ( maximum speed ) line 23-28 in // ~/tools/Arduino/arduino-1.8.5/hardware/arduino/avr$ // avr-objdump -D -S MCNET_NeoPixelReceiver.ino.elf > dump.txt // PB3 is D11 on Arduino Nano #define INPUTPIN (1<=16)val=1; else val=0; return val; } uint8_t ReceivedByte=0; boolean receiveBits(boolean inputBit) { static uint8_t state=0; static uint8_t val=0; boolean okFlag=false; static uint8_t counter=0; switch(state) { // wait for start bit case 0: { counter=0; val=0; if(inputBit!=0) state=1; }break; // receive bytes; case 1: { val|=inputBit<");Serial.write(ReceivedByte);Serial.print(" - ");Serial.println(ReceivedByte); Serial.write(ReceivedByte); } delay(10); }