Agriculture Robot for Farmers.....Multipurpose AgriBOT

by doitcreative275Lingesh in Circuits > Electronics

940 Views, 4 Favorites, 0 Comments

Agriculture Robot for Farmers.....Multipurpose AgriBOT

IMG_20230609_212704_480.jpg
IMG_20230609_212640_877.jpg
IMG_20230609_212830_949.jpg
IMG_20230609_212918_131.jpg
IMG_20230609_212934_639.jpg
IMG_20230609_212952_551.jpg

Hiii....... Everybody .......Lets intro myself

My name is LINGESH from India, at small village or rural area.

Basically,we are Farmers [my family].


Supplies

9248.jpg
9254.jpg
12512.jpg
17175.jpg
17176.jpg
17177.jpg
17178.jpg
17179.jpg
17180.jpg
7317.jpg
IMG_20230609_211634_266.jpg
IMG_20230609_211705_103.jpg
IMG_20230609_211720_713.jpg
IMG_20230609_211740_038.jpg
IMG_20230609_211753_285.jpg
IMG_20230609_211827_888.jpg
IMG_20230609_211844_121.jpg
IMG_20230609_212126_194.jpg
IMG_20230609_212144_428.jpg
IMG_20230609_212720_027.jpg
IMG_20230609_212804_279.jpg

Materials used to make Muiltipurpose agriculture Robot.......


Necessary wood working tools...

*hack saw

*drilling machine

*angle grinder

*sand paper

*jig saw

*table saw

*drill bits

*files for sanding

*gum

*safety goggles

*screws

*fewiquik or anabond

*wood piece

*nuts and bolds

*pvc pipes


Electronic tools....

*gule gun

*soldering tools

*multimeter

*variable bench power supply


Electronics components....

*Arduino is necessary uno or mega

*solar panels

*servo motors

*geared motors

*motor drivers like l293d or l298

*boost & buck convertor modules

*temperature sensor

*LCD display

*soil moisture sensor

*bluetooth modules

*wifi modules

*ir sensors

*wires

*wheels for geared dc motors

*dc water pump motor

some electronics necessary components......

etc,......

PLANNING

IMG_20231108_180018_417.jpg
IMG_20231108_180354_613.jpg
IMG_20231108_180033_331.jpg
IMG_20231108_181108_926.jpg
IMG_20231108_180340_985.jpg

Firstly i...will try to create plan for my agri robot

I had many more ideas... but this time i was created plan for multi purpose Agriculture robot.....

like wise ...

this robot can do...anthing like

*Ploughing

*seed showing

*irrigating

*manuring or fertillizer showing

*soil moisture detecting

*humiditiy measuring

*temperture values

*proximitiy sensing for automtic obstacle avoiding

*controling by using

#BLUETOOTH

#WIFI

#VOICE CONTROL or COMMANDS

#Remote Control using (nRF24L01) 2.4GHz

etc,.....


ARDUINO

IMG_20230802_190209_343[1].jpg
12303.jpg
12304.jpg
17159.jpg

Some components need for.... making this like Ardiuno L293d motor sheild ...few things etc..,

And coding for that ...robot i need to know more about arduino coding .....i have no that much of knowledge of coding ....in future i will do very well ....


Circuit Diagrams

10915.jpg
16815.jpg
16818.jpg
16821.jpg
16822.jpg
automatic-watering-circuit.jpg

These are the few circuit diagrams i used ....

Arduino Transmitter & Reciver

15626.jpg
15628.jpg
17170.jpg
17169.jpg
17168.jpg
IMG_20231231_115741_196[1].jpg
1704004115050[1].jpg

In tutorial we will learn how to build a DIY Arduino RC transmitter. Very often I need wireless control for the projects that I make, so therefore I built this multifunctional radio controller which can be used for pretty much everything.


Overview

Now I can wirelessly control any Arduino project with just some small adjustments at the receiver side. This transmitter can be also used as any commercial RC transmitter for controlling RC toys, cars, drones and so on. For that purpose it just needs a simple Arduino receiver which then generates the appropriate signals for controlling those commercial RC devices.



I will explain how everything works in this video through few examples of controlling an Arduino robot car, controlling the Arduino Ant Robot from my previous video and controlling a brushless DC motor using an ESC and some servo motors.

The radio communication of this controller is based on the NRF24L01 transceiver module which if used with an amplified antenna it can have a stable range of up to 700 meters in open space. It features 14 channels, 6 of which are analog inputs and 8 digital inputs.

It has two joysticks, two potentiometers, two toggle switches, six buttons and additionally an internal measuring unit consisting of an accelerometer and a gyroscope which can be also used for controlling things with just moving around or tilting the controller.

Arduino RC Transmitter Circuit Diagram


To begin with, let’s take a look at the circuit diagram. The brain of this RC controller is an Arduino Pro Mini which is powered using 2 LiPo batteries producing around 7.4 volts. We can connect them directly to the RAW pin of the Pro Mini which has a voltage regulator that reduced the voltage to 5V. Note that there are two versions of the Arduino Pro Mini, like the one I have that operates at 5V and the other operates at 3.3V.


On the other hand, the NRF24L01 module strictly needs 3.3V and it’s recommended to come from a dedicated source. Therefore we need to use a 3.3V voltage regulator which is connected to the batteries and convert the 7.4V to 3.3V. Also we need to use a decoupling capacitor right next to the module in order to keep the voltage more stable, thus the radio communication will be more stable as well. The NRF24L01 module communicates with the Arduino using SPI protocol, while the MPU6050 accelerometer and gyro module uses the I2C protocol.

You can get the components needed for this Arduino Tutorial from the links below:

  • NRF24L01 Transceiver Module……….. Amazon / Banggood / AliExpress
  • NRF24L01 + PA + LNA ……………………. Amazon / Banggood / AliExpress
  • Potentiometer ……………………………….. Amazon / Banggood / AliExpress
  • Servo Motor …………………………………… Amazon / Banggood / AliExpress
  • Toggle Switch …………………………….….. Amazon / Banggood / AliExpress
  • Joystick ………………………………………….. Amazon / Banggood / AliExpress – this Joystick comes with a breakout board so you will have to desolder the Joystick from it
  • Joystick without breakout board ………… Ebay
  • Arduino Pro Mini…………………………….. Amazon / Banggood / AliExpress– You need PCB V2 or V3 version for this boards
  • Arduino Pro Mini like the one I used….. Ebay– PCB V1
  • HT7333 3.3v voltage regulator ……………. From local electronic shop – PCB V1 & PCB V2
  • AMS1117 3.3v voltage regulator …………… Amazon




DIY Arduino based RC Transmitter Code

Let’s explain how the transmitter code works. So first we need to include the SPI and RF24 library for the wireless communication, and the I2C library for the accelerometer module. Then we need to define the digital inputs, some variables needed for the program below, define the radio object and the communication address.

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Wire.h>


// Define the digital inputs
#define jB1 1 // Joystick button 1
#define jB2 0 // Joystick button 2
#define t1 7 // Toggle switch 1
#define t2 4 // Toggle switch 1
#define b1 8 // Button 1
#define b2 9 // Button 2
#define b3 2 // Button 3
#define b4 3 // Button 4

const int MPU = 0x68; // MPU6050 I2C address
float AccX, AccY, AccZ;
float GyroX, GyroY, GyroZ;
float accAngleX, accAngleY, gyroAngleX, gyroAngleY;
float angleX, angleY;
float AccErrorX, AccErrorY, GyroErrorX, GyroErrorY;
float elapsedTime, currentTime, previousTime;
int c = 0;


RF24 radio(5, 6); // nRF24L01 (CE, CSN)
const byte address[6] = "00001"; // Address
Code language: Arduino (arduino)

Then we need to define a structure where we will store the 14 input values of the controller. The maximum size of this structure can be 32 bytes because that’s the NRF24L01 buffer limit or the amount of data the module can send at once.


/ Max size of this struct is 32 bytes - NRF24L01 buffer limit
struct Data_Package {
byte j1PotX;
byte j1PotY;
byte j1Button;
byte j2PotX;
byte j2PotY;
byte j2Button;
byte pot1;
byte pot2;
byte tSwitch1;
byte tSwitch2;
byte button1;
byte button2;
byte button3;
byte button4;
};

Data_Package data; //Create a variable with the above structure
Code language: Arduino (arduino)

In the setup section we need to initialize the MPU6050 module and we can also calculate the IMU error which is a values that is later used when calculating the correct angles of the module.


void initialize_MPU6050() {
Wire.begin(); // Initialize comunication
Wire.beginTransmission(MPU); // Start communication with MPU6050 // MPU=0x68
Wire.write(0x6B); // Talk to the register 6B
Wire.write(0x00); // Make reset - place a 0 into the 6B register
Wire.endTransmission(true); //end the transmission
// Configure Accelerometer
Wire.beginTransmission(MPU);
Wire.write(0x1C); //Talk to the ACCEL_CONFIG register
Wire.write(0x10); //Set the register bits as 00010000 (+/- 8g full scale range)
Wire.endTransmission(true);
// Configure Gyro
Wire.beginTransmission(MPU);
Wire.write(0x1B); // Talk to the GYRO_CONFIG register (1B hex)
Wire.write(0x10); // Set the register bits as 00010000 (1000dps full scale)
Wire.endTransmission(true);
}
Code language: Arduino (arduino)

You can find more details how MEMS accelerometer and gyro work here. A dedicated tutorial for the MPU6050 is coming soon.

Then we need to initialize the radio communication, activate the Arduino internal pull-up resistors for all digital inputs and set the initial default values for all variables.


// Define the radio communication
radio.begin();
radio.openWritingPipe(address);
radio.setAutoAck(false);
radio.setDataRate(RF24_250KBPS);
radio.setPALevel(RF24_PA_LOW);

// Activate the Arduino internal pull-up resistors
pinMode(jB1, INPUT_PULLUP);
pinMode(jB2, INPUT_PULLUP);
pinMode(t1, INPUT_PULLUP);
pinMode(t2, INPUT_PULLUP);
pinMode(b1, INPUT_PULLUP);
pinMode(b2, INPUT_PULLUP);
pinMode(b3, INPUT_PULLUP);
pinMode(b4, INPUT_PULLUP);
Code language: Arduino (arduino)

In the loop section start by reading the all analog inputs, map their values from 0 to 1023 into byte values from 0 to 255 because we already defined the variables in our structure as bytes. Each input is stored in the particular data variable from the structure.


// Read all analog inputs and map them to one Byte value
data.j1PotX = map(analogRead(A1), 0, 1023, 0, 255); // Convert the analog read value from 0 to 1023 into a BYTE value from 0 to 255
data.j1PotY = map(analogRead(A0), 0, 1023, 0, 255);
data.j2PotX = map(analogRead(A2), 0, 1023, 0, 255);
data.j2PotY = map(analogRead(A3), 0, 1023, 0, 255);
data.pot1 = map(analogRead(A7), 0, 1023, 0, 255);
data.pot2 = map(analogRead(A6), 0, 1023, 0, 255);
Code language: Arduino (arduino)

We should just note that because we use the pull-up resistors the digital pins readings are 0 when the buttons are pressed.

// Read all digital inputs
data.j1Button = digitalRead(jB1);
data.j2Button = digitalRead(jB2);
data.tSwitch2 = digitalRead(t2);
data.button1 = digitalRead(b1);
data.button2 = digitalRead(b2);
data.button3 = digitalRead(b3);
data.button4 = digitalRead(b4);
Code language: Arduino (arduino)

So using the radio.write() function we simple send the values from all 14 channels to the receiver.


// Send the whole data from the structure to the receiver
radio.write(&data, sizeof(Data_Package));
Code language: Arduino (arduino)

In case the toggle switch 1 is switched on, then we use the accelerometer and gyro data instead for the control.

if (digitalRead(t1) == 0) {
read_IMU(); // Use MPU6050 instead of Joystick 1 for controling left, right, forward and backward movements
}
Code language: Arduino (arduino)

So instead of the joystick 1 X and Y values we are using the angle values we are getting from the IMU, which we previously convert them from values from -90 to +90 degrees into byte values from 0 to 255 appropriately.

// Map the angle values from -90deg to +90 deg into values from 0 to 255, like the values we are getting from the Joystick
data.j1PotX = map(angleX, -90, +90, 255, 0);
data.j1PotY = map(angleY, -90, +90, 0, 255);
Code language: Arduino (arduino)

So that’s how the transmitter code, the most important things were defining the radio communication and sending the data to the receiver.

Here’s the complete Arduino code for this DIY Arduino RC Transmitter:

/*
DIY Arduino based RC Transmitter
by Dejan Nedelkovski, www.HowToMechatronics.com
Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
*/

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Wire.h>


// Define the digital inputs
#define jB1 1 // Joystick button 1
#define jB2 0 // Joystick button 2
#define t1 7 // Toggle switch 1
#define t2 4 // Toggle switch 1
#define b1 8 // Button 1
#define b2 9 // Button 2
#define b3 2 // Button 3
#define b4 3 // Button 4

const int MPU = 0x68; // MPU6050 I2C address
float AccX, AccY, AccZ;
float GyroX, GyroY, GyroZ;
float accAngleX, accAngleY, gyroAngleX, gyroAngleY;
float angleX, angleY;
float AccErrorX, AccErrorY, GyroErrorX, GyroErrorY;
float elapsedTime, currentTime, previousTime;
int c = 0;


RF24 radio(5, 6); // nRF24L01 (CE, CSN)
const byte address[6] = "00001"; // Address

// Max size of this struct is 32 bytes - NRF24L01 buffer limit
struct Data_Package {
byte j1PotX;
byte j1PotY;
byte j1Button;
byte j2PotX;
byte j2PotY;
byte j2Button;
byte pot1;
byte pot2;
byte tSwitch1;
byte tSwitch2;
byte button1;
byte button2;
byte button3;
byte button4;
};

Data_Package data; //Create a variable with the above structure

void setup() {
Serial.begin(9600);

// Initialize interface to the MPU6050
initialize_MPU6050();

// Call this function if you need to get the IMU error values for your module
//calculate_IMU_error();

// Define the radio communication
radio.begin();
radio.openWritingPipe(address);
radio.setAutoAck(false);
radio.setDataRate(RF24_250KBPS);
radio.setPALevel(RF24_PA_LOW);

// Activate the Arduino internal pull-up resistors
pinMode(jB1, INPUT_PULLUP);
pinMode(jB2, INPUT_PULLUP);
pinMode(t1, INPUT_PULLUP);
pinMode(t2, INPUT_PULLUP);
pinMode(b1, INPUT_PULLUP);
pinMode(b2, INPUT_PULLUP);
pinMode(b3, INPUT_PULLUP);
pinMode(b4, INPUT_PULLUP);

// Set initial default values
data.j1PotX = 127; // Values from 0 to 255. When Joystick is in resting position, the value is in the middle, or 127. We actually map the pot value from 0 to 1023 to 0 to 255 because that's one BYTE value
data.j1PotY = 127;
data.j2PotX = 127;
data.j2PotY = 127;
data.j1Button = 1;
data.j2Button = 1;
data.pot1 = 1;
data.pot2 = 1;
data.tSwitch1 = 1;
data.tSwitch2 = 1;
data.button1 = 1;
data.button2 = 1;
data.button3 = 1;
data.button4 = 1;
}
void loop() {
// Read all analog inputs and map them to one Byte value
data.j1PotX = map(analogRead(A1), 0, 1023, 0, 255); // Convert the analog read value from 0 to 1023 into a BYTE value from 0 to 255
data.j1PotY = map(analogRead(A0), 0, 1023, 0, 255);
data.j2PotX = map(analogRead(A2), 0, 1023, 0, 255);
data.j2PotY = map(analogRead(A3), 0, 1023, 0, 255);
data.pot1 = map(analogRead(A7), 0, 1023, 0, 255);
data.pot2 = map(analogRead(A6), 0, 1023, 0, 255);
// Read all digital inputs
data.j1Button = digitalRead(jB1);
data.j2Button = digitalRead(jB2);
data.tSwitch2 = digitalRead(t2);
data.button1 = digitalRead(b1);
data.button2 = digitalRead(b2);
data.button3 = digitalRead(b3);
data.button4 = digitalRead(b4);
// If toggle switch 1 is switched on
if (digitalRead(t1) == 0) {
read_IMU(); // Use MPU6050 instead of Joystick 1 for controling left, right, forward and backward movements
}
// Send the whole data from the structure to the receiver
radio.write(&data, sizeof(Data_Package));
}

void initialize_MPU6050() {
Wire.begin(); // Initialize comunication
Wire.beginTransmission(MPU); // Start communication with MPU6050 // MPU=0x68
Wire.write(0x6B); // Talk to the register 6B
Wire.write(0x00); // Make reset - place a 0 into the 6B register
Wire.endTransmission(true); //end the transmission
// Configure Accelerometer
Wire.beginTransmission(MPU);
Wire.write(0x1C); //Talk to the ACCEL_CONFIG register
Wire.write(0x10); //Set the register bits as 00010000 (+/- 8g full scale range)
Wire.endTransmission(true);
// Configure Gyro
Wire.beginTransmission(MPU);
Wire.write(0x1B); // Talk to the GYRO_CONFIG register (1B hex)
Wire.write(0x10); // Set the register bits as 00010000 (1000dps full scale)
Wire.endTransmission(true);
}

void calculate_IMU_error() {
// We can call this funtion in the setup section to calculate the accelerometer and gury data error. From here we will get the error values used in the above equations printed on the Serial Monitor.
// Note that we should place the IMU flat in order to get the proper values, so that we then can the correct values
// Read accelerometer values 200 times
while (c < 200) {
Wire.beginTransmission(MPU);
Wire.write(0x3B);
Wire.endTransmission(false);
Wire.requestFrom(MPU, 6, true);
AccX = (Wire.read() << 8 | Wire.read()) / 4096.0 ;
AccY = (Wire.read() << 8 | Wire.read()) / 4096.0 ;
AccZ = (Wire.read() << 8 | Wire.read()) / 4096.0 ;
// Sum all readings
AccErrorX = AccErrorX + ((atan((AccY) / sqrt(pow((AccX), 2) + pow((AccZ), 2))) * 180 / PI));
AccErrorY = AccErrorY + ((atan(-1 * (AccX) / sqrt(pow((AccY), 2) + pow((AccZ), 2))) * 180 / PI));
c++;
}
//Divide the sum by 200 to get the error value
AccErrorX = AccErrorX / 200;
AccErrorY = AccErrorY / 200;
c = 0;
// Read gyro values 200 times
while (c < 200) {
Wire.beginTransmission(MPU);
Wire.write(0x43);
Wire.endTransmission(false);
Wire.requestFrom(MPU, 4, true);
GyroX = Wire.read() << 8 | Wire.read();
GyroY = Wire.read() << 8 | Wire.read();
// Sum all readings
GyroErrorX = GyroErrorX + (GyroX / 32.8);
GyroErrorY = GyroErrorY + (GyroY / 32.8);
c++;
}
//Divide the sum by 200 to get the error value
GyroErrorX = GyroErrorX / 200;
GyroErrorY = GyroErrorY / 200;
// Print the error values on the Serial Monitor
Serial.print("AccErrorX: ");
Serial.println(AccErrorX);
Serial.print("AccErrorY: ");
Serial.println(AccErrorY);
Serial.print("GyroErrorX: ");
Serial.println(GyroErrorX);
Serial.print("GyroErrorY: ");
Serial.println(GyroErrorY);
}

void read_IMU() {
// === Read acceleromter data === //
Wire.beginTransmission(MPU);
Wire.write(0x3B); // Start with register 0x3B (ACCEL_XOUT_H)
Wire.endTransmission(false);
Wire.requestFrom(MPU, 6, true); // Read 6 registers total, each axis value is stored in 2 registers
//For a range of +-8g, we need to divide the raw values by 4096, according to the datasheet
AccX = (Wire.read() << 8 | Wire.read()) / 4096.0; // X-axis value
AccY = (Wire.read() << 8 | Wire.read()) / 4096.0; // Y-axis value
AccZ = (Wire.read() << 8 | Wire.read()) / 4096.0; // Z-axis value

// Calculating angle values using
accAngleX = (atan(AccY / sqrt(pow(AccX, 2) + pow(AccZ, 2))) * 180 / PI) + 1.15; // AccErrorX ~(-1.15) See the calculate_IMU_error()custom function for more details
accAngleY = (atan(-1 * AccX / sqrt(pow(AccY, 2) + pow(AccZ, 2))) * 180 / PI) - 0.52; // AccErrorX ~(0.5)

// === Read gyro data === //
previousTime = currentTime; // Previous time is stored before the actual time read
currentTime = millis(); // Current time actual time read
elapsedTime = (currentTime - previousTime) / 1000; // Divide by 1000 to get seconds
Wire.beginTransmission(MPU);
Wire.write(0x43); // Gyro data first register address 0x43
Wire.endTransmission(false);
Wire.requestFrom(MPU, 4, true); // Read 4 registers total, each axis value is stored in 2 registers
GyroX = (Wire.read() << 8 | Wire.read()) / 32.8; // For a 1000dps range we have to divide first the raw value by 32.8, according to the datasheet
GyroY = (Wire.read() << 8 | Wire.read()) / 32.8;
GyroX = GyroX + 1.85; //// GyroErrorX ~(-1.85)
GyroY = GyroY - 0.15; // GyroErrorY ~(0.15)
// Currently the raw values are in degrees per seconds, deg/s, so we need to multiply by sendonds (s) to get the angle in degrees
gyroAngleX = GyroX * elapsedTime;
gyroAngleY = GyroY * elapsedTime;

// Complementary filter - combine acceleromter and gyro angle values
angleX = 0.98 * (angleX + gyroAngleX) + 0.02 * accAngleX;
angleY = 0.98 * (angleY + gyroAngleY) + 0.02 * accAngleY;
// Map the angle values from -90deg to +90 deg into values from 0 to 255, like the values we are getting from the Joystick
data.j1PotX = map(angleX, -90, +90, 255, 0);
data.j1PotY = map(angleY, -90, +90, 0, 255);
}



Receiver Code

Now let’s take a look at how we can receive this data. Here’s a simple Arduino and NRF24L01 receiver schematic. Of course you can use any other Arduino board.


And here’s a simple receiver code where we will receive the data and simply print it on the serial monitor so that we know that the communication works properly. Again we need to include the RF24 library and define the objects and the structure the same way as in the transmitter code. In the setup section when defining the radio communication we need to use the same settings as the transmitter and set the module as receiver using the radio.startListening() function.

/*
DIY Arduino based RC Transmitter Project
== Receiver Code ==

by Dejan Nedelkovski, www.HowToMechatronics.com
Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(10, 9); // nRF24L01 (CE, CSN)
const byte address[6] = "00001";

unsigned long lastReceiveTime = 0;
unsigned long currentTime = 0;

// Max size of this struct is 32 bytes - NRF24L01 buffer limit
struct Data_Package {
byte j1PotX;
byte j1PotY;
byte j1Button;
byte j2PotX;
byte j2PotY;
byte j2Button;
byte pot1;
byte pot2;
byte tSwitch1;
byte tSwitch2;
byte button1;
byte button2;
byte button3;
byte button4;
};

Data_Package data; //Create a variable with the above structure

void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, address);
radio.setAutoAck(false);
radio.setDataRate(RF24_250KBPS);
radio.setPALevel(RF24_PA_LOW);
radio.startListening(); // Set the module as receiver
resetData();
}
void loop() {
// Check whether there is data to be received
if (radio.available()) {
radio.read(&data, sizeof(Data_Package)); // Read the whole data and store it into the 'data' structure
lastReceiveTime = millis(); // At this moment we have received the data
}
// Check whether we keep receving data, or we have a connection between the two modules
currentTime = millis();
if ( currentTime - lastReceiveTime > 1000 ) { // If current time is more then 1 second since we have recived the last data, that means we have lost connection
resetData(); // If connection is lost, reset the data. It prevents unwanted behavior, for example if a drone has a throttle up and we lose connection, it can keep flying unless we reset the values
}
// Print the data in the Serial Monitor
Serial.print("j1PotX: ");
Serial.print(data.j1PotX);
Serial.print("; j1PotY: ");
Serial.print(data.j1PotY);
Serial.print("; button1: ");
Serial.print(data.button1);
Serial.print("; j2PotX: ");
Serial.println(data.j2PotX);
}

void resetData() {
// Reset the values when there is no radio connection - Set initial default values
data.j1PotX = 127;
data.j1PotY = 127;
data.j2PotX = 127;
data.j2PotY = 127;
data.j1Button = 1;
data.j2Button = 1;
data.pot1 = 1;
data.pot2 = 1;
data.tSwitch1 = 1;
data.tSwitch2 = 1;
data.button1 = 1;
data.button2 = 1;
data.button3 = 1;
data.button4 = 1;
}
Code language: Arduino (arduino)

In the main loop using the available() function we check whether there is an incoming data. If true we simply read the data and store it into the variables of the structure. Now we can print the data on the serial monitor to check whether the transmission work properly. Also using the millis() function and an if statement we check whether we keep receiving data, or if we don’t receive data for a period longer than 1 second, then we reset variables to their default values. We use this to prevent unwanted behavior, for example if a drone has a throttle up and we lose connection it can keep flying away unless we reset the values.



So that’s it. Now we can implement this method of receiving the data for any Arduino project. For example here the code for controlling the Arduino Agriculture robot from my idea...

As an update to this project, I made a dedicated Arduino based RC Receiver. Again, it’s based on the Arduino Pro mini board and it has several ready to use servos and ESCs connections, placed on a compact PCB.



Thanking to Instructables

10920.jpg
10922.jpg

Agricultural robots are automated machines that can perform tasks on farms or in agricultural environments. They can be programmed to perform specific tasks or be designed to react to their environment. 

Agricultural robots can perform crop maintenance tasks such as: Harvesting, Applying pesticides, Weeding. 

They can also operate in greenhouses. 

Agricultural robots can benefit farmers by: 


  • Filling labor gaps
  • Reducing labor costs
  • Performing dull or repetitive tasks
  • Taking on dangerous tasks

The agriculture robot market was valued at USD 7.07 billion in 2022 and is predicted to reach USD 24 billion by 2030. 


Some examples of agricultural robots include: 


  • Autonomous Mobile Robots (AMRs): These robots can haul fruits, vegetables, and potted plants.
  • EcoRobotix: This Swiss startup developed an autonomous robot that uses scan-and-spray technology to spot weeds.

Other types of robots used in horticulture include: 


  • Demeter
  • Fruit picking robots
  • Drones
  • Forester robot
  • Robot suit
  • Vitirover solar robot


Finally this is my first instuctables...thanking you.....