![arduino camera signal switch contol arduino camera signal switch contol](https://rees52-fbcb.kxcdn.com/24945-thickbox_default/2-channel-5v-usb-relay-module-usb-intelligent-control-switch-for-compatible-with-arduino-rs2549.jpg)
Of course we want RS485 with 2 wires, however we encountered a problem: the TX module was supplying 5v (in idle state) to the camera even when it responded ( For more explanation). RS485 with 2 wires (TX-, TX+ OR TX-, TX+ and RX- ,RX+ ) RS485 with 4 wires (TX-, TX+ and RX- ,RX+) RS422 with 5 wires (GND, TX-, TX+ and RX- ,RX+) (TX is here from Arduino to camera and RX camera to Arduino) A pair of wires with RS485 bidirectionalįirst of all we need to configure the camera via the dip switch, we have 3 possible modes: My vacation is now over, I had a little tchat with my teacher and we figured out that the most "easy" way to have multiple cameras without denuding the already present wires is to have: The 2 modules that generates RS485 works with the 2 mains architectures (avr and esp32) I had keypad laying around my place so I plugged him in the esp and onto the testing and good news! What do we do with a functionning library, we test it! I swear the title is not a Clint Eastwood reference O_O Pgm_read_byte(&DATA1) //(Demo purpose not in the lib) While Intellisense keeps throwing error because it's a bit dumb (don't worry I fixed) Ok problem fixed The solution: After reading a bit of documentation, you actually need to do this: Why? Because progmem is maintained by a library: pgmspace.h (more on the arduino refenrece) If I want to compare the Command PAN_L to DATA1, I can't use a loop with DATA1 (with i incrementing) The problem: Getting a value of progmem's flash isn't what it is. The solution: have a list with every special case! const byte CMND1 PROGMEM = //will I use it? Ok so to resume, the lib need to know which command we are sending to correctly parse the input data (e.g: if the command is SET_PAN, the lib must compute the given angle to hex values to transmit) Arduino administration is simpler than France oneĦ hours of debugging can save you 5 minutes of reading documentation.The camera, the keypad and the computer.6 hours of debugging can save you 5 minutes of reading documentation.
![arduino camera signal switch contol arduino camera signal switch contol](https://content.instructables.com/ORIG/FQK/9VHD/IF9UAFK9/FQK9VHDIF9UAFK9.jpg)
![arduino camera signal switch contol arduino camera signal switch contol](https://www.graylogix.in/wp-content/uploads/2021/05/IMG_20210518_190459-1-1024x835.jpg)
Hello and welcome back to a project log! I would first thank you all for following me in this project and huge thanks to Arsenijs Picugins who made an article about RS485 which is very well documented