Tuesday, February 26, 2019

Node MCU & Arduino : Microcontroller for IoT devices



Node MCU (ESP8266)  is a microcontroller having similar function as Arduino which has many advantages over Arduino UNO i.e. Low cost,integrated support for wifi networks, small , low power consumption.
best websites for better understanding :
Official website - click here
Arduino uno  offical website for software installation - click here
https://www.elecrow.com -click here

Arduino code for led blinking - click here
nodeMCU code:-

 wifi server - click here

IIT BHU Robotics workshop files - click here
IIT Patna workshop files - click here

Online Shopping 



Tuesday, February 5, 2019

C++ Programming with Technical Akash | Conditionals and Loops

To print table of any number ; input of the number is taken by the user ; using for loop

#include<iostream>
using namespace std;
int main()
{
    float i;
    int x;
    cout <<"table of any number" <<endl <<"enter the number whose table is to be write" <<endl ;
    cin>> i;
    for(x=1;x<11;x++)
    {
        cout <<x <<"x" <<i <<"=" <<x*i << endl ;
    }
    return 0;
}


while loop

#include<iostream>
using namespace std;
int main()
{
    int i=1,j;
    cout <<"enter the last number" <<endl ;
    cin>>j;
    cout <<"this is our counting from 1" << endl;
    while(i<=j)
       {
             cout<<i <<endl;
                i++;
       }
}

output


do while loop

#include<iostream>
using namespace std;
int main()
{
    int a,b;
    cout << "enter the first and last number " <<endl;
    cin>>a;
    cin>>b;
    int c =a;
    cout<<"the series is " <<endl;
    do
    {
        cout<< c <<endl;
        c+=2;
    }
    while (c<=b);
}
output

C++ With Technical Akash | Data type , Array and Pointers


Array basic example

#include <iostream>
using namespace std;
int main()
{
    int a[]={3,5,4,6,7};
    cout<< a[3];
}

output



While loop in in array;

#include<iostream>
using namespace std;
int main()
{
    int a[]={2,4,45,5,35,46,4567,567,57,567,45,75,};
    int b=0;
    do
    {
      cout <<a[b] <<endl;
      b+=1;
    }
    while (b<6);
}


C++ with Technical Akash | Function

* A function is  a group of statements that can perform a particular tasks.
But how we was performing the tasks without knowing about function ? Actually we was using a function named "main" function . A c++ program must have at least one function.
We can reuse function and we can modify it somewhere in program.

#include<iostream>
using namespace std;
int akash()
{
    cout<< "technical akash will solve your all problems";
}
int main()
{
    akash();
}

Here int is called function return type which must be defined , and akash is function name which is further recalled in int function.

=> we can also modify functon after defining it , see below a example :-

#include<iostream>
using namespace std;
int akash()

int main()
{
    akash();
    akash();
}
int akash()
{
    cout<< "technical akash will solve your all problems"<<endl;
    cout << "this is our modified function "<<endl;
}