Blog

Arduino Uno Free Sketch Codes

IOT Based GPS Tracking

//Purchase a device ID and replace it with the xxxxx value found above void setup(String deviceID = “xxxxx”;) and upload code.
//For more information, contact us using any of the means below:
//WhatsApp Chat: +2347031011012
//Email: customercare@akifagoelectronics.com
//
//
#include <SoftwareSerial.h>
#include <TinyGPS.h>
#include <EEPROM.h>
TinyGPS gps;
SoftwareSerial gsm(2, 3);
int gpsLed = 4;
String latitude = “”;
String longitude = “”;
String deviceID = “xxxxx”; //Change xxxxx To Purchased device ID

void setup() {
Serial.begin(9600);
gsm.begin(9600);
pinMode(gpsLed, OUTPUT);
delay(10000);
}

void loop() {
bool newData = false;
unsigned long chars;
unsigned short sentences, failed;
// For one second we parse GPS data and report some key values
for (unsigned long start = millis(); millis() – start < 1000;)
{
while (Serial.available())
{
char c = Serial.read();
// Serial.write(c); // uncomment this line if you want to see the GPS data flowing
if (gps.encode(c)) // Did a new valid sentence come in?
newData = true;
}
}
if (newData)
{
float flat, flon;
unsigned long age;
gps.f_get_position(&flat, &flon, &age);
//
latitude = String(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
longitude = String(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
//
digitalWrite(gpsLed, HIGH);
//
sendData();
}
if (!newData){
//
digitalWrite(gpsLed, LOW);
//
}
}

void sendData(){
gsm.println(“AT+CSQ”);
delay(1000);
gsm.println(“AT+CGATT?”);
delay(1000);
gsm.println(“AT+SAPBR=3,1,CONTYPE,GPRS”);
delay(1000);
gsm.println(“AT+SAPBR=3,1,\”APN\”,\”\””);
delay(1000);
gsm.println(“AT+SAPBR=1,1”);
delay(1000);
gsm.println(“AT+HTTPINIT”);
delay(1000);
gsm.println(“AT+HTTPPARA=CID,1”);
delay(1000);
gsm.println(“AT+HTTPPARA=URL,www.akifagoelectronics.com.ng/AEC78TGPSTRA2CK/dataUpdate_one.php?id=” + String(deviceID) + “&latitudeValue=” + String(latitude) + “&longitudeValue=” + String(longitude));
delay(1000);
gsm.println(“AT+HTTPACTION=0”);
delay(1000);
gsm.println(“AT+HTTPTERM”);
delay(1000);
}

Latest Inventions, Innovations and Researches

CONSTRUCTION OF ANGLE 40 DEGREE BY TRISECTING ANGLE 120 DEGREE USING A RULER AND PAIR OF COMPASS

CONSTRUCTION PROCEDURE:
1. Draw a line XY of any given length.
2. Place your compass to any given radius and then draw a semicircle AB from the point O along the horizontal line XY.
3. With the same radius used in the semicircle, place your compass at point B, make an arc C, and then place a point C and then make another arc D.
4. Draw a straight line OF passing through point D of the arc and the semicircle, such that the angle between lines XY and OF equals 120 degree. And then repeat by drawing a straight line OE passing through point C of the arc and the semicircle such that the angle between lines XY and OE equals 60 degree.
5. Mark the points, B and D where the semicircle and the lines XY and OF intersects each other.
6. Draw a straight line to meet the points B and D.
7. Then construct angle 90 degree at both points B and D by placing your compass with a given radius at point B then draw a semicircle and mark 1 and 2 where it touches line XY. Then extend the compass to any given radius greater than the initial radius earlier used for semicircle. Place the compass at points 1 and 2 and draw arcs for each point respectively. Repeat the process for point D as earlier stated for point B and then number the points where the semicircle touches the line OF as 4 and 5.
8. Mark the points of intersection of arcs drawn from points 1 and 2 as 3, and then for arcs drawn from points 4 and 5 as 6.
9. Draw a straight line from point B passing through point 3 and terminates at the 60 degree line drawn earlier. Repeat the same process by drawing a straight line from point D passing through point 6 and them terminates at the 60 degree line drawn earlier.
10. Name the new point where both lines meet along the 60 degrees line as E.
11. Draw an arc labeled 7 and 8 of the same radius used for OA or OB semicircle from point E to pass across both 90 degrees lines drawn from points B and D earlier.
12. Name the new point Q where the arc touches any of the 90 degrees lines and point P where the line OE meets the line BD and then draw a straight line from point P to point Q.
13. Then draw a line from point O passing through point where the line PQ touches the semicircle AB to any given length to obtain the 40 degrees angle required.
NOTE: With the introduction of this concept, other angle such as 2.5, 5, 10, 20, 40, 80, 160, 200, 240, 260, 280, 300, 320, 340, 360 Degrees.

_______________________________________________

WIRELESS CHARGING SYSTEM

Wireless charging of a mobile phone using inductive coils.

DERIVED FORMULA:

Vs = Vp – (3.1526 x D)

Where,

Vs is the received coil supply voltage.

Vp is the transmitting coil supply voltage.

D is the distance between the coils.