WEEKLY ASSIGNMENTS

Networking and Communications

 

Due to my lack of experience in the electrical field. I decided to start with a basic communication set up, to understand how networking and communication in general works. I will work on the Bluetooth and see how it can be communicated to my mobile and the boardI will communicate with it to switch the light on and off, I will use in the first stage the Arduino board to look at the full function. 

The test on the Arduino was good, one of the things I face during this test on the Arduino, as I don't wire the TX and RX to the Bluetooth until I finish from uploading the program, as I understand that because the communication between the board and the program are still active and communicate. 
then I wired TX and RX to Blue tooth (HC06 ), and download Arduino Bluetooth controller from the play store to do the test function.

Designing the Schematic for the board. Using AtTiny 44, Serial connection and one LED, Cap and a reporter. 

Uploading the sketch from my computer to the Board using ISP, The verify on the Arduino show it is fine and uploading was good, but the when I start testing the function (Communicate with the bluetooth and the board.) did not work, I start testing the connections on the board and the soldering Every thing was goodthen getting back to the design, it seems in that stage everything was in place, that was stage one in troubleshooting, Next was reuploading the program with and during the uploading, did, then without the and the same result no action on the light, and that forces me to rethink the of the, found out that solder the in the wrong, was a quick a lesson to learn. 

Reupload the sketch, on the mobile app ( Terminal Mode ) you need to make sure you have the exact number as example 0 to it off and 1 To it ON. 

SoftwareSerial mySerial(0, 1); // RX, TX
void setup()
{
    mySerial.begin(9600);   //Sets the baud for serial data transmission                               
    pinMode(13, OUTPUT);  //Sets digital pin 13 as output pin
    pinMode(7, OUTPUT);
    pinMode(8, OUTPUT);
}
void loop()
{
   if(mySerial.available() > 0)      // Send data only when you receive data:
   {
      data = mySerial.read();        //Read the incoming data & store into data
        
      if(data == '1')  {            // Checks whether value of data is equal to 1
         digitalWrite(13, HIGH);   //If value is 1 then LED turns ON
  digitalWrite(7, HIGH); 
         digitalWrite(8, HIGH);}
           
       if(data == '0') {        //  Checks whether value of data is equal to 0
         digitalWrite(13, LOW);   //If value is 0 then LED turns OFF
digitalWrite(7, LOW);
digitalWrite(8, LOW);}
         
   }
}

For me the next stage to see how two or three Bluetooth setup works and how to communicate between other devices. 

right click - save link as