Posts

Showing posts from October, 2017

Arduino basic:How to get sub string from a string in arduino

Image
ArduinoTutorial 01:String manipulation 1 (Getting substring from a large string) hello, everyone in some cases we need small parts of the string to manipulate. here substring and index function play an important role. I am providing example code in this blog  String IP = "111.222.333.444"; int FIRST_INDEX; int SECOND_INDEX; int THIRD_INDEX; void setup() { Serial.begin(9600); FIRST_INDEX=IP.indexOf("."); SECOND_INDEX=IP.indexOf(".",FIRST_INDEX+1); THIRD_INDEX=IP.indexOf(".",SECOND_INDEX+1 ); Serial.print(IP.substring(0,FIRST_INDEX)); Serial.print(IP.substring(FIRST_INDEX+1,SECOND_INDEX)); Serial.print(IP.substring (SECOND_INDEX+1 ,THIRD_INDEX )); } void loop() {   // put your main code here, to run repeatedly:   } https://youtu.be/fjVXhcqWlEM ......watch more videos related to Aduino Assistance

GPS INTERFACING WITH ARDUINO

Connect GPS pin to arduino as follow: TX of GPS  -->   Digital Pin 1 RX of GPS  -->   Digital Pin 0 VCC of GPS  -->   +5V GND of GPS  -->   GND --------------------------------------------------------------------------------- Program:[usefull with arduino uno,nano,mini] --------------------------------------------------------------------------------- #include <Roshan.h> roshan gps(9600); void setup() {    gps.begingps();   Serial.println("roshan is included"); } void loop() {    String rawgps= "";   rawgps= gps.getgps();   Serial.println(gps.getgps());  Serial.println("lattitude="+gps.getlattitude(a));  Serial.println("longitude="+gps.getlongitude(a));  delay(1000); } --------------------------------------------------------------------------------- NOTE:- YOU WILL NEED HERE LIBRARY FOR GPS   Here I have developed my own library,you can download it from the below given link... Download Roshan