Giter VIP home page Giter VIP logo

ai_robot_for_remote_information-monitoring's Introduction

๐Ÿ‘‹ Hello all, I'm Navid, an achievement-focused tech-enthusiast from Bangladesh.

๐Ÿ‘จโ€๐Ÿ’ป AI Developer with experience in Full-Stack ML & AIoT development with international recognition of performance.

๐Ÿ‘€ Contributing inclusively in ML and AI, have strong industry experience of serving various client settings globally.

๐ŸŒฑ Active practitioner of Python for AI and worked in C/C++ for IoT: 3 of the world's most admired programming languages.

๐Ÿ’ž๏ธ Look forward to working with the challenging and exciting AI teams to utilize my award-winning leadership and technical skills.

๐Ÿ“ซ Can be reached over LinkedIn or Portfolio

ai_robot_for_remote_information-monitoring's People

Contributors

navidbinahmed avatar

Watchers

 avatar  avatar

ai_robot_for_remote_information-monitoring's Issues

DHT transmission with robot movement-wireless monitoring info robot

//Copyright-navid, [email protected]

int pin8= 8;
int pin9=9;
int pin10=10;

int sensorValue8=0;
int sensorValue9=0;
int sensorValue10=0;

int rF = 5;
int rB = 7;
int lF = 2;
int lB = 4;

// Generally, you should use "unsigned long" for variables that hold time
// The value will quickly become too large for an int to store
unsigned long previousMillis = 0; // will store last time LED was updated

// constants won't change :
const long interval = 5000; // interval at which to update tem. and hum. data (milliseconds)

// Include needed libraries
#include <VirtualWire.h>
#include <DHT.h>

// Defininition
#define dhtPin 11
#define dhtType DHT11
#define txPowerPin 13

// using the DHT library
DHT dht(dhtPin, dhtType);

// Variables
char msg0[3];
char msg1[3];

int tem = 0;
int hum = 0;

void setup() {
Serial.begin(9600); //debug purpose, comment it out after debugging finished
//for linefollower
pinMode(rF, OUTPUT);
pinMode(rB, OUTPUT);
pinMode(lF, OUTPUT);
pinMode(lB, OUTPUT);
//for transmission_receiving
pinMode(txPowerPin, OUTPUT);
pinMode(txPowerPin, LOW);
vw_setup(4800); // VirtualWire communication speed
vw_set_tx_pin(12); // VirtualWire transmit pin
}

void loop() {

// check to see if it's time to update tem. and hum. data; that is, if the
// difference between the current time and last time you updated
// the tem. and hum. data is bigger than the interval at which you want to
// update tem. and hum. data.
unsigned long currentMillis = millis();

if (currentMillis - previousMillis >= interval) {
unsigned long startTime = millis(); //debug purpose, comment it out after debugging finished
//for transmission receiving
digitalWrite(txPowerPin, HIGH);
hum = dht.readHumidity(); // Variable holding humidity
tem = dht.readTemperature(); // Variable holding temperature
itoa(hum, msg1, 10); // Converting humidity to an array of chars
itoa(tem, msg0, 10); // Converting the temperature to an array of chars
strcat(msg0, msg1); // Adding/joining the two arrays
vw_send((uint8_t *)msg0, strlen(msg0)); // Sending the msg
vw_wait_tx(); // Wait for tx to finish
digitalWrite(txPowerPin, LOW);
// save the last time you updated the tem. and hum. data
previousMillis = currentMillis;
unsigned long stopTime = millis(); //debug purpose, comment it out after debugging finished
Serial.print("Time(mS) for updating tem and hum sensor: "); //debug purpose, comment it out after debugging finished
Serial.println(stopTime - startTime); //debug purpose, comment it out after debugging finished
}
//delay(5000);//delay replaced by if condition written above // Wait five seconds and it again
//for line follower
pinMode(pin8, OUTPUT);
pinMode(pin9, OUTPUT);
pinMode(pin10,OUTPUT);

digitalWrite(pin8, HIGH);
digitalWrite(pin9, HIGH);
digitalWrite(pin10,HIGH);
delay(1);

pinMode(pin8, INPUT);
pinMode(pin9, INPUT);
pinMode(pin10,INPUT);
delay(1);

sensorValue8=digitalRead(pin8);
sensorValue9=digitalRead(pin9);
sensorValue10=digitalRead(pin10);

if (sensorValue8==LOW && sensorValue9==HIGH && sensorValue10==LOW) //010-F
{
digitalWrite(rF, HIGH); //forward
digitalWrite(rB, LOW);
digitalWrite(lF, HIGH);
digitalWrite(lB, LOW);
}
else if (sensorValue8==LOW && sensorValue9==LOW && sensorValue10==HIGH) //001-turn L
{
digitalWrite(rF, HIGH); //left
digitalWrite(rB, LOW);
digitalWrite(lF, LOW);
digitalWrite(lB, HIGH);
delayMicroseconds(1);
}
else if (sensorValue8==HIGH && sensorValue9==LOW && sensorValue10==LOW) //100-turn R
{
digitalWrite(rF, LOW); //right
digitalWrite(rB, HIGH);
digitalWrite(lF, HIGH);
digitalWrite(lB, LOW);
delayMicroseconds(1);
}

else if (sensorValue8==LOW && sensorValue9==LOW && sensorValue10==LOW) //000-B
{
digitalWrite(rB, HIGH); //back
digitalWrite(lB, HIGH);
delayMicroseconds(1);
}
}

DHT average receive-wireless monitoring info robot

//Copyright-navid, [email protected]

// Include needed libraries
#include <VirtualWire.h>
#include <LiquidCrystal.h>

// Definitions for the LCD connections
#define RS 9
#define E 8
#define D4 5
#define D5 4
#define D6 3
#define D7 2

LiquidCrystal lcd(RS, E, D4, D5, D6, D7);

// "Drawing" the degree symbol
byte degreesymbol[8] = {
B01100,
B10010,
B10010,
B01100,
B00000,
B00000,
B00000,
B00000
};

// Variables
int avgTemp = 0;
int i;
int avghum=0;

// Setup function - run one time
void setup() {
lcd.begin(16,2); // Defining the LCD
lcd.createChar(1, degreesymbol); // Creating the degree symbol at place 1
Serial.begin(9600); // For debugging purpose
vw_setup(4800); // VirtualWire communication speed
vw_rx_start(); // Getting redy to receive
vw_set_rx_pin(6); // VirtualWire receive pin
lcd.clear(); // Clear the LCD
}

// Loop function - runs forever
void loop() {

uint8_t buf[VW_MAX_MESSAGE_LEN]; // Variable to hold the received data
uint8_t buflen = VW_MAX_MESSAGE_LEN; // Variable to hold the length of the received data
{
void Temp1() {
lcd.setCursor(0,0);
lcd.print("Temp1: ");
if (vw_get_message(buf, &buflen)) // If data is received
{
for (i=0;i<2;i++) // Get the two first bytes
{
Serial.write(buf[i]); // Debugging purpose
lcd.write(buf[i]); // Write the first bytes on the LCD
}
Serial.println(); // Debugging purpose
lcd.write(1); // Write the degree symbol on the LCD
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Hum1: ");
for (i=2;i<4;i++) // Get the two last bytes
{
Serial.write(buf[i]); // Debugging
lcd.write(buf[i]); // Write the last bytes on the LCD
}
lcd.print("% RH");
}
delay(4000);
}

void Temp2() {
lcd.setCursor(0,0);
lcd.print("Temp2: ");
if (vw_get_message(buf, &buflen)) // If data is received
{
for (i=0;i<2;i++) // Get the two first bytes
{
Serial.write(buf[i]); // Debugging purpose
lcd.write(buf[i]); // Write the first bytes on the LCD
}
Serial.println(); // Debugging purpose
lcd.write(1); // Write the degree symbol on the LCD
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Hum2: ");
for (i=2;i<4;i++) // Get the two last bytes
{
Serial.write(buf[i]); // Debugging
lcd.write(buf[i]); // Write the last bytes on the LCD
}
lcd.print("% RH");
}
delay(4000);
}
void Temp3()
{
lcd.setCursor(0,0);
lcd.print("Temp3: ");
if (vw_get_message(buf, &buflen)) // If data is received
{
for (i=0;i<2;i++) // Get the two first bytes
{
Serial.write(buf[i]); // Debugging purpose
lcd.write(buf[i]); // Write the first bytes on the LCD
}
Serial.println(); // Debugging purpose
lcd.write(1); // Write the degree symbol on the LCD
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Hum3: ");
for (i=2;i<4;i++) // Get the two last bytes
{
Serial.write(buf[i]); // Debugging
lcd.write(buf[i]); // Write the last bytes on the LCD
}
lcd.print("% RH");
}
delay(4000);
}
void Temp4()
{
lcd.setCursor(0,0);
lcd.print("Temp4: ");
if (vw_get_message(buf, &buflen)) // If data is received
{
for (i=0;i<2;i++) // Get the two first bytes
{
Serial.write(buf[i]); // Debugging purpose
lcd.write(buf[i]); // Write the first bytes on the LCD
}
Serial.println(); // Debugging purpose
lcd.write(1); // Write the degree symbol on the LCD
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Hum4: ");
for (i=2;i<4;i++) // Get the two last bytes
{
Serial.write(buf[i]); // Debugging
lcd.write(buf[i]); // Write the last bytes on the LCD
}
lcd.print("% RH");
}
delay(4000);
}
void Temp5()
{
lcd.setCursor(0,0);
lcd.print("Temp5: ");
if (vw_get_message(buf, &buflen)) // If data is received
{
for (i=0;i<2;i++) // Get the two first bytes
{
Serial.write(buf[i]); // Debugging purpose
lcd.write(buf[i]); // Write the first bytes on the LCD
}
Serial.println(); // Debugging purpose
lcd.write(1); // Write the degree symbol on the LCD
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("Hum5: ");
for (i=2;i<4;i++) // Get the two last bytes
{
Serial.write(buf[i]); // Debugging
lcd.write(buf[i]); // Write the last bytes on the LCD
}
lcd.print("% RH");
}
delay(4000);
}
void Avg() {
lcd.setCursor(0,0);
lcd.print("avgTemp: ");
if (vw_get_message(buf, &buflen)) // If data is received
{
for (i=0;i<2;i++) // Get the two first bytes
{
Serial.write(buf[i]); // Debugging purpose
lcd.write(buf[i]); // Write the first bytes on the LCD
}
Serial.println(); // Debugging purpose
lcd.write(1); // Write the degree symbol on the LCD
lcd.print(" C");
lcd.setCursor(0,1);
lcd.print("avgHum: ");
for (i=2;i<4;i++) // Get the two last bytes
{
Serial.write(buf[i]); // Debugging
lcd.write(buf[i]); // Write the last bytes on the LCD
}
lcd.print("% RH");
}
delay(4000);
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.