We've got an abandoned building, a f* ton of led strips and lipo batteries and a bunch of amateur film geeks, and racing drone pilots & i want to light up the building for a fit inducing FPV drone race, (and film it all for youtube)... but i'm pretty much a noob to arduino & stuck on some coding.
So, I already have some store brought light controllers for the coloured strips to be used to light the features. But for the gates to fly through, i want to use some white 12v strips linked in a square (approx 1.5m*4) I've been working on a system using a mega to send commands via 433tx to nanos with receivers, and a relay.
To start i was hoping just to work on the ability to power the gates remotely (using a button on the mega), which i managed to get working. however now i've been working on the ability to address the gates individually so i can flash one specifically, or enable certain sections of the track. the problem i'm having is with arranging the data for sending via virtual wire
vw_send((uint8_t *)senddata, strlen(senddata));
so i only need to send a few digits, i want 2 for gate addressing. followed by one to signify power state of the relay... sounds simple but....how the f* do i do this??? I've tried all sorts...
if i modify the data in the loop via something like char senddata = (120); then i can modify what is going to be sent. but that way means having to do a bit of code to change the data to address every gate, instead i want to make an array, in which i can modify either the gate number (first 2 digits)or state (last digit).
Everything i have tried brings up either conversion errors or just outright doesn't work, rather than list my many failed attempts, does anyone know how to go about it. how do i create a viable array for sending, how do i modify each digit(s) (*,) -without overwriting the whole array and how do i send it.
i think the receivers are sorted but tell me if i've been dumb here too
if ((buf == '0') && (buf == '1') && (buf( == 1)) so this would be on gate 1, and if it receives 011 it would activate the relay
please help :) i've spent far longer on this than i wish to admit many thanks