Programming and Testing

let’s begin

Programming and Testing:

Programming :

My robot board was fabricated to communicate with the remote controller using the radio frequency through the NRF24, after many tries I concluded that the this communication was not fixed , it changed from time to time , I meant that at this moment it works perfectly but a little change of the place could cut the connection , for that I thought about changing the NRF24 into HC-12 .

It was cool to try addapting new device into my board andin the remote controller at the same time, HC-12 was simple in its use after I learnt how to master using it from watching tutorials from the internet

HC-12 pins (TX-RX-GND AND VCC) for the remote controller, I removed the 8 pins holders of the NRF24 and I used the CSN and CE for both TX AND RX . Here is the result I got :

I used the CSN and CE pin headers in my board for the second HC-12 (TX and RX)

I tried to communicate at first the HC-12 in my board and the remote controller HC-12 for that I wrote a simple code for both Transmitter(controller) and reciever(My board), it inclded a word ‘’ HELLO’‘ the mission was to recieve the messasge from the transmitter and the reciever and it worked perfectly

I used the arduino ISP for uploading the code to the remote and the FTDI to my board :

Testing:

After checking that the connection between the two HC-12 is good and worked perfectly , it was time to personalise the code and to controle the brushless motors , ultrasonic sensor and the buzzer all together .

I used both brushless in one potentiometer, but after the tests I made, I decided to separate it and to controle them each with a pot , the brushless motors was too fast so I tried to reduce it speed for a better controlling of the robot

After days of testing I finaly succeed to creat my final code ant it was perfectly working ^^

The code function:

  • Controlling the brushless motors with the remote controller two potentiometers , in the same time when the Ultrasonic sensor detected somthing in 10mm of distance the buszzer sensor sonne , my first idea was to blink the remote controller LED when the ultrasonic feel an object but unfortunatly because the HC-12 was a half duplex device .

FPV CAMERA TESTING

Here it is the final result ^^

Transmitter code

Reciever code