Tuesday, October 17, 2017

A Solution for Connectiing Rural Students with Urban Teachers (IHack 3.0 Finalists)

Introduction 

Over the last few weeks we have gone through all the Scenarios and selected the scenario  number two which is related to the education of the rural students. Why we have selected this scenario. Srilanka is a developing country so the youth education will play a major role in the development of our country. The Darken part of the Educational structure in Srilanka has been a distressing issue for past several decades. Though many schemes have been launched to improve the scenario, the condition of the rural education in Srilanka continues to be miserable. Issues like the professionally trained teachers not willing to work in rural areas, Lack of facilities and infrastructure and Lack of soft skills among students. As a results, there is a huge gap between urban area students and the rural area students. E-Learning can be the key to unlock the challenges faced by the rural students and help Srilanka bridge this gap. The ultimate goal of this solution is creating network to connect good-will from experts to help the rural area students. As this is a non profit project it is not efficient to invest a large volume to this project, therefore establishing a website would be a good choice. Since the teachers voluntarily support this website there would be no need to hire them and as long as the school has a computer and  internet connection this idea could be efficiently implemented.

The product 

Over View It is a website with many features which assists students in their education. It provides with access to vast amount of learning materials. It is a good learning management system which shapes the information and adds learnability quotient to it. The world of E-learning system is vast but with a right knowledge of the management it is possible to get. We are providing that kind of facility through our website, such that we will be including lecture videos for each seperate subjects categorized by grades.  So students and teachers can find the relevant videos easily. And also we have different features for different grade students like the small age people’s user interface is with more pictures than phrases so that they can access and get the relevant knowledge easily. The main Feature in our website is it can be viewable in all three languages. Also we are conducting the online exams categorized by grades, which is already marked and stored. So with an ease, students can be able to get there results at once after they are done with exams. It also allows them to test themselves on what they have learned.

Key benefits & features 

In our website we are having five Important features

1)Recorded Sessions – In this section we are having lecture videos for the related subjects with grade wise separation. And the lecture videos are according to government syllabus. For every chapter we are having explanations from a professional volunteer lecturer. Lecture videos will be in all three languages. 2)Discussion Board (Questions and Answer) – While watching the lecture videos students may get doubts. They can ask their doubts through this feature. When they ask the doubt it will notify to the relevant lecturer and then that lecturer will clear their doubts. So there will be a clear interaction between the students and the lecturers.
3)Request for Equipment – This section is useful for the rural schools. Through this section they can ask the essential equipments like projector, WiFi routers etc from us. When they apply it will notify us and we can help from donation funds. 4)Donation- In this section volunteers from urban areas can donate. When a volunteer clicked the donation button there will be two sections, one is online transaction through this he/she can transfer the amount. The other one will provide information on a bank account to which he/she can directly deposit. This section will also display equipments that are requested by the schools. The volunteer can donate to the equipment, and once enough donation is collected, the equipment will be provided to the school. And photos of it will be uploaded to our website. This will show the volunteers what their donation is used for and will encourage more volunteers to donate. 5)Volunteer for Video-  Through this section volunteer lecturers can upload the videos, once they upload we’ll review that particular video and if it is good then we’ll upload it to the relevant lecture section. And we will also give reputations to that particular lecturer like Stackoverflow  and Github by recording their contribution and the review from schools and students.

Relevance of the product for the given Problem 

The main problem of this Scenario is lack of teachers in rural areas. Through our website we are providing good lectures from professional lecturers and we are also providing virtual guidance for the students through question and answer sessions. With this website schools from rural areas can get some latest equipment like projector and WiFi routers , so that their infrastructure will improve, and also students in rural area can learn in the absence of the physical school attendance. By utilizing off-the shelf content, a lot time and effort can be saved. The contents (Lecture Videos, printable notes, etc) once created can be reused multiple times to teach different regions. In rural areas if class rooms replaced by PCs or portable devices connected to the internet may play a major role in attracting as well as retaining more students. A major percentage of rural area students are incapable of reading or writing in English for that problem we are providing students to access our website in all three languages.

The Execution Plan Business & Marketing Plan  

This is a very cost effective project since the website could be hosted using free website hosting sites. The schools are the main target of the business, where academic requirement with least expenses would be highly encouraged.  The website could be published via posters,newspapers and social media. The awareness of this website will be further explicated to the rural schools by writing to their principals in order to serve the most needy students. Donation boxes can be placed in popular shops and supermarkets which will attract the attention of many people. This gains more donation and also serves as an advertisement for the website. These effective marketing strategies will immensely support the development and enrich the application of the website.

Technical Overview 

The heart of our website is the lecture videos to store these lecture videos we need a database(MySQL) and we’ll connect that database through PhP to our main website. For designing part we are planning to use Bootstrap Framework to maintain a pledge of quality, upgradeability and maintainability of
applications at lower cost. For donation part if it is online donation we are planning to make people’s donations through Paypal System because it’s a secured system for transactions. We have five stakeholders Admins , Students, Rural School admins, Lecturers and Common users with login credential. The below diagram explains what are the use cases for them.


Wednesday, August 2, 2017

Computer Security

Computer Security


What is Computer Security

It is refers to techniques for ensuring that data stored in a computer cannot be read or modify by any individuals without authorization. Most of the computer security measures involve data encryption and passwords.
The purpose of the computer security is prevent the weakness of the system.

There are 3 goals in computer security
  • Confidentiality                                                      
  • Integrity
  • Availability

Confidentiality

It ensures that computer- related assets are accessed only by authorized parties. Confidentiality is sometimes called secrecy or privacy.

Integrity

It means that assets can be modified only by authorized parties or only in authorized ways.

Availability

It means that assets are accessible to authorized party at appropriate times.

The main challenge in building a secure system is finding the right balance among the goals , which often conflict.

Vulnerability

Vulnerability is weakness in the security system. weakness can appear in any element of a computer , both in the hardware , operating system, and software. The types of vulnerabilities we might find as they apply to the assets of hardware, software, and data. These three assets and the connections among them are all potential security weak points.

Hardware Vulnerability

It is more visible than software , because it is composed of physical objects. It is rather simple to attack by adding devices, changing them, removing them, intercepting the traffic to them, or flooding them with traffic until they can no longer function.
                     

Software Vulnerability

Software can be replaced , changed, or destroyed maliciously, or it can be modified, deleted, or misplaced accidentally. whether intentional or not , these attacks exploit the software's vulnerability.
Sometimes the attacks are obvious , as when the software no longer runs. more subtle are attacks in which the software has been altered but seems to run normally.

Data Vulnerability

Data attack is more wide spread and serious problem than either a hardware or software attack. data items have greater public value than hardware and software because more people know how to use or interpret data.


Secure the computer

First choose a good secured operating system

Choose a web browser based on it's security and vulnerabilities because most malware will come through via your web browser

when setting up use strong passwords in your user account, router account etc. Hackers may use dictionary attacks and brute force attacks.

When downloading software (including anti virus software) , get it from a trusted source.

Install good Anti Virus software because anti virus software is designed to deal with modern malware including viruses, trojans, key loggers, rootkits and worms.

Sources and Citations


THANK YOU  
HAVE A SECURED WORLD😎








Friday, July 7, 2017

Selection of a Solid Topic for Next Blog

Choosing Solid Topic for Next Blog

Always we have one question arise while start to write a blog, that is "I don't know what to write about😕". said every one of us, ever. Even i chose this topic because i also have this problem😋.


I just wanted to clarify some points here about choosing a topic for a blog.
Before you start writing anything for your blog always begin by doing some research whether that topic is in current trend and see how your viewers approaching it. find a unique tactic. Blogging can be a hobby or a mean to earn money. Regardless what ever your purpose is, you write blog because you want people to read about it.

Here are few steps to get started
  • Planning :- Planning is a good habit to have if you want to be a successful blogger. plan on topics , sources, and what other people think.
  • Passion :-  Write about things you are passionate about. so that readers will feel your passion and connect with you and will want to read more from you.
  • Research :-   Truth be told bloggers don't know everything. However they cannot blog for just one thing, it must be boring for readers. so, they have to come out of the box and think. for that they need to research to find something interesting for readers.
If you follow these steps before selecting a topic you will be able to select a good solid topic.

Then the Contents Part


The subject can be Complex, but your writing shouldn't be. because whatever the topic maybe , the most important reason why you are writing is to be understood by different users. then only your blog will get some popularity.
avoid unnecessary things while writing a blog, always focus on the topic.
add relevant pictures and smilies so that people will get attracted and start to read your topic without boring. always check if you can replace complicated words with similar simple words. so that everyone can understand you point of view easily.

If you are a good blogger always respect the culture. There is an example in our past "Most of you all are familiar with  J.K.Rowling who wrote Harry Potter series. 
After Name change

First Release

Her first book  named as "Harry Potter and the Philosopher’s Stone” was replaced with “Harry Potter and the Sorcerer’s Stone” for the US market. It was done because the publishers felt that American children would be less comfortable with “philosopher”. 
                                              






Now you're equipped with solid topics and interesting titles and ready to start firing off those blog Posts.

You people may also think that this fellow is also a new blogger and he's advising about blogging this much early😋 .  after first and the second post i also started thinking about a new topic and analyzed so much but couldn't find a better topic for my next blog (Even i googled it as always we do😋), so i thought to write about the same problem that i have faced . that's why i wrote this😎😎   

Thankyou

Looking forward your feedbacks😎                                                          

Thursday, July 6, 2017

Programming From My point of view

Some Truth of Computer Programming


There are 3 Fundamental truth of computer programming as far as i know
1. Software will have bugs : The libraries you use, components you add, every line you add to the code, has potential to go wrong, if not today, may be tomorrow. Problem becomes more severe when in world of abstraction and you rely on code you don’t write.

2. Hardware will have failures : Every hardware, every server is governed by laws of physics and is bound to go down one day or another.

3. Humans will make mistakes : You can’t assume user of your program will always play by your rules, think of it as a crazy person pushing random buttons!
A well written computer program is one which in spite of above three conditions will continue to operate gracefully. for that you need to understand the programming concepts.
  1. There are only a handful of truly critical programming concepts. The way things are stored (memory), the way things run (step-by-step in most programming languages), the way things talk to each other remotely (client-server interaction in most programming projects).
  2. You can learn without the theory. it's about what user really want from us. you need understand the main purpose of the software. programming is easy if you understand the concept.
  3.  There’s no real “self-learning”. Many programmers pride themselves with being self-taught. Most programmers either
    • copy and paste code online - that’s not learning (even i do😋)
    • read books and take courses 
    • try stuff until it works the way they want, which I think is closest to being self-taught.
I just defined “self-taught” as “no-guidance-taught”. Which was my point in the very beginning. Learning programming is generally difficult, especially if you're on your own. There's a wealth of information out there (google) , but it's only in bits , code to paste in your projects, tutorials about how to do this and that, so you can get your job done and move on - which doesn't build skill. it just gives marks. Marks is nothing now a days. experience matter. 
If you do want to learn to code, learn by your self, create your own project and do. that will make sense .
The language you use doesn't matter. There's so much argument about which language is better . At the end of the day what matters is can you solve the problem?
Programming isn't sexy at all. Try taking that girl home by telling her your heroic tale of saving an entire department by rewriting a recursive function to take advantage of a feature in the new server Intel chips to scale up their online orders. Then tell me how it goes. (copied😋 this paragraph, I love the way words used here).
These are some of my point of view in programming. 

NightCrawler (CuttingEdge Project 2017)

NightCrawler

Introduction & Usage


It's a Wifi controlled spy Robot.  It is a drivable device that can be controlled from anywhere  using a WiFi connection (If you have wifi connection all over your country you can control it from anywhere😉). it gives live stream is used to view it's surroundings. Users can view and go through tight Unaccessible places and also can investigate dark areas. when the NightCrawler reaches the dark areas Led will blink so user can view the video clearly. It can also be use for Spying, taking pictures, and making films.

Picture of the complete version


Making & Assembling the Structure

The following electronics components are used in this Structure

            1)Arduino Uno
            2)WiFi Shiled module (ESP8266)
            3)H-bridge module (For controlling motor)
            4)1 kohm resistors
            5)10 kohm resistors
            6)5V USB Power bank
            7)Jumper wires
            8)Led lights
            9)Photo resistor
           10)ultrasonic sensor
           11)buzzer

First design the mechanical structure of the robot, which is easy you can buy the structure from the following link http://www.lankatronics.com/smart-car-chassis.html and can build it easily.
Then the connection of the electronic components, the circuit here uses an Arduino Uno as the main controller, which interfaces with a WiFi Shiled module (ESP8266) for wifi communication. The Arduino controls the DC motors using a H-bridge driving circuit, which is able to control up to two motors, rotating them independently in both directions. Connect the LDR and LED to the circuit to avoid the darkness.  The power bank is use to power Arduino and provides 5v Voltage. Connect all the components using jumper wires.

Connected Picture 

Explanation of Code 

The code uses one serial port for the communication between the Arduino and the WiFi shield Module, and another is for communication between the Arduino and the computer. Once the Arduino Uno only have one serial port, Software Serial library is use to create a secondary port, using digital pins 2 and 3.
During the setup, both serial communications have to be started, and their baudrate defined. Notice that my WiFi module was set to 115200 kbps. 
Some Explanation for commands
  • AT+RST: Reset WiFi module
  • AT+CWMODE: set module to access point
  • AT+CWJAP: connect a Wi-Fi network given by its SSID and password
  • AT+CIPMUX: set module for multiple connections or single connection
  • AT+CIPSERVER: start communication
An auxiliary function is used for sending data , reading and displaying the response on Serial Monitor.
Five possible commands are define (cm1 to cm5). Whenever the Arduino receives one of those commands they are moving forward,  moving backward, moving right, moving left and stand by, it enters in one of five possible commands\ and continue in that command until it receives a different command.
Each state defines the signals for motors pins. I use digitalWrite(pin, LOW) when I want to set a pin to 0V and analogWrite(pin, motoSpeed) when I want to turn on a pin. Using analogWrite allowed me to change the speed of the motor, and make the robot move slower.
Notice that the motors work between 3 and 6V. 
A html interface is design for the control of the NightCrawler.
An Android smart phone was used to broadcast the live video and audio from the robot to the control interface. You can find the app on Google Play store.(https://play.google.com/store/apps/details?id=com.pas.webcam).

Html Code Explain

The html interface has two divisions, one is for audio and video (from IP Webcam) and the other one is for the five commands.
Audio and video division has a form with a text box and a button. This is used as an input for specifying Webcam IP address. It comes with a standard IP address (192.168.0.5), but the user can enter a different IP which will be there in IP webcam. Video and audio are loaded when we enter the IP address which will show in the serial monitor.
JavaScript is used for dealing with the interface and sending data to the Arduino. Those scripts are coded in different files, and added on html header.
By using the laptop navigation keys you can control the crawler.

 Light & Dark Detection

If the NightCrawler goes into dark places you can't see the video clearly because of the lack of light, for that purpose i'm using LDR which detects darkness and turn on the LED. so that you can see the clear vision of the video

Picture of the Circuit

 Future Enhancements

Detect obstacles and their distance
Control camera angles through app
Record Streamed video and audio

Explanation from Poster


Arduino Code
//include libraries
#include <SoftwareSerial.h>

SoftwareSerial esp8266(3, 2); //RX pin = 3, TX pin = 2

//definition of variables
#define DEBUG true //show messages between ESP8266 and Arduino in serial port
int state = 5; //define initial state of the robot (5 = stand-by)
//define motor pins
const int motor1Pin1 = 5;
const int motor1Pin2 = 6;
const int motor2Pin1 = 9;
const int motor2Pin2 = 10;
//led blink
int sensepin = 0;
int ledpin = 12;
//define motor speed
int motorSpeed = 150; //motor speed (PWM)

//*****
//SETUP
//*****
void setup()
{
  //set pin modes
  pinMode(motor1Pin1, OUTPUT);
  pinMode(motor1Pin2, OUTPUT);
  pinMode(motor2Pin1, OUTPUT);
  pinMode(motor2Pin2, OUTPUT);
  
  //start communication
  Serial.begin(115200);
  esp8266.begin(115200);
  
  sendData("AT+RST\r\n", 2000, DEBUG); //reset module
  sendData("AT+CWMODE=1\r\n", 1000, DEBUG); //set station mode
  sendData("AT+CWJAP=\"ghost\",\"sam12346\"\r\n", 2000, DEBUG); //connect wi-fi network 
  delay(5000); //wait for connection

  sendData("AT+CIFSR\r\n", 1000, DEBUG); //show IP address
  sendData("AT+CIPMUX=1\r\n", 1000, DEBUG); //allow multiple connections
  sendData("AT+CIPSERVER=1,80\r\n", 1000, DEBUG); // start web server on port 80
  //led blink
  // put your setup code here, to run once:
  analogReference(DEFAULT); //not necessary

  //   Serial.begin(9600);
  pinMode(ledpin, OUTPUT);
}


//*********
//MAIN LOOP
//*********
void loop()
{
   
  if (esp8266.available())  //verify incoming data
  {
    if (esp8266.find("+IPD,")) //if there is a message
    {
      String msg;
      esp8266.find("?"); //look for the message
      msg = esp8266.readStringUntil(' '); //read whole message
      String command = msg.substring(0, 3); //first 3 characters = command
      Serial.println(command);
           
      //move forward
      if(command == "cm1") {
          state = 1;
      }

      //move backward
      if(command == "cm2") {
          state = 2;
      }

      //turn right
      if(command == "cm3") {
          state = 3;
       }
       
       //turn left
       if(command == "cm4") {
          state = 4;
       }

       //do nothing       
       if(command == "cm5") {
          state = 5;
       }

    }
  }
  
  //STATE 1: move forward
  if (state == 1) {
    analogWrite(motor1Pin1, motorSpeed);
    digitalWrite(motor1Pin2, LOW);
    analogWrite(motor2Pin1, motorSpeed);
    digitalWrite(motor2Pin2, LOW);
  }
  //STATE 2: move backward
  if (state == 2) {
    digitalWrite(motor1Pin1, LOW);
    analogWrite(motor1Pin2, motorSpeed);
    digitalWrite(motor2Pin1, LOW);
    analogWrite(motor2Pin2, motorSpeed);  }
  //STATE 3: move right
  if (state == 3) {
    analogWrite(motor1Pin1, motorSpeed);
    digitalWrite(motor1Pin2, LOW);
    digitalWrite(motor2Pin1, LOW);
    analogWrite(motor2Pin2, motorSpeed);
  }
  //STATE 4: move left
  if (state == 4) {
    digitalWrite(motor1Pin1, LOW);
    analogWrite(motor1Pin2, motorSpeed);
    analogWrite(motor2Pin1, motorSpeed);
    digitalWrite(motor2Pin2, LOW);
  }
  //STATE 5: do nothing
  if (state == 5) {
    digitalWrite(motor1Pin1, LOW);
    digitalWrite(motor1Pin2, LOW);
    digitalWrite(motor2Pin1, LOW);
    digitalWrite(motor2Pin2, LOW);
  }
   int value = analogRead(sensepin);
  value = constrain(value, 20, 250);
  int ledlevel = map(value, 50, 250, 255, 0);
  analogWrite(ledpin, ledlevel);
}

//*******************
//Auxiliary functions
//*******************
String sendData(String command, const int timeout, boolean debug)
{
  String response = "";
  esp8266.print(command);
  long int time = millis();
  while ( (time + timeout) > millis())
  {
    while (esp8266.available())
    {
      char c = esp8266.read();
      response += c;
    }
  }
  if (debug)
  {
    Serial.print(response);
  }
  return response;
  
}

Html Code 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="Igor Fonseca Albuquerque">
<title>Control interface</title>

<script>
$.ajaxSetup({timeout:100});

var latch = false;

function readUrlAV (form) {
    TextVar = form.inputbox.value;
VideoVar = "http://"+TextVar+":8080/video";
AudioVar = "http://"+TextVar+":8080/audio.opus";
document.getElementById("video").setAttribute('data', VideoVar);
document.getElementById("audio").setAttribute('data', AudioVar);
}
function testarArduino (form) {
    TextVar = myform2.inputbox.value;
ArduinoVar = "http://" + TextVar + ":80";
$.get( ArduinoVar, { "cm3": 7000 }) ;
{Connection: close};
}

document.onkeydown = checkKeyDown;
document.onkeyup = checkKeyUp;

function checkKeyDown(e) {

    e = e || window.event;

    if (e.keyCode == '38') {
        // up arrow
if (latch == false) {
TextVar = myform2.inputbox.value;
ArduinoVar = "http://" + TextVar + ":80";
$.get( ArduinoVar, { "cm1": 1000 }) ;
{Connection: close};
latch = true;
}
    }
    else if (e.keyCode == '40') {
        // down arrow
if (latch == false) {
TextVar = myform2.inputbox.value;
ArduinoVar = "http://" + TextVar + ":80";
$.get( ArduinoVar, { "cm2": 1000 }) ;
{Connection: close};
latch = true;
}
    }
    else if (e.keyCode == '37') {
       // left arrow
   if (latch == false) {
TextVar = myform2.inputbox.value;
ArduinoVar = "http://" + TextVar + ":80";
$.get( ArduinoVar, { "cm3": 1000 }) ;
{Connection: close};
latch = true;
}

}
    else if (e.keyCode == '39') {
       // right arrow
   if (latch == false) {
TextVar = myform2.inputbox.value;
ArduinoVar = "http://" + TextVar + ":80";
$.get( ArduinoVar, { "cm4": 1000 }) ;
{Connection: close};
latch = true;
}
}
}

function checkKeyUp(e) {
    e = e || window.event;

    if ((e.keyCode == '38')||(e.keyCode == '40')||(e.keyCode == '37')||(e.keyCode == '39')) {
        // up arrow
setTimeout(doNothing, 200);
    }
}

function doNothing(){
TextVar = myform2.inputbox.value;
ArduinoVar = "http://" + TextVar + ":80";
$.get( ArduinoVar, { "cm5": 1000 }) ;
{Connection: close};
latch = false;
}

</script>

</head>

<body>

<div id="main">
<div id="video_and_audio" style="position: absolute; top: 50px; width:25%">
<form name="myform" action="" method="GET">
IP Webcam (IP):
<input type="text" name="inputbox" value="192.168.0.5">
<input type="button" name="button1" value="Load" onClick="readUrlAV(this.form)">
</form>

<object id="video" type="text/html" data="http://192.168.0.5:8080/video" 
style="position: absolute; width:100%; height:480px;">
</object>
<object id="audio" type="text/html" data="http://192.168.0.5:8080/audio.opus"
style="position: absolute; width:388px; height:30px; left:8px; top:425px;">
</object>
</div>
<div id="commands" style="position: absolute; top: 50px; left:35%; width:65%">
<form name="myform2" action="" method="GET">
Arduino IP Address:
<input type="text" name="inputbox" Value="192.168.0.5">
<input type="button" name="button3" Value="Test" onClick="testarArduino(this.form)">
</form>
<img src="images/keyboard.png" style="margin-left:100px; margin-top:50px;">
<h4> Press and hold keyboard arrow keys to move the robot </h4>
</div>
    </div>
</body>
</html>

More Updates will come in future like using ultra sensors. Thank you for reading my blog.


A Solution for Connectiing Rural Students with Urban Teachers (IHack 3.0 Finalists)

Introduction  Over the last few weeks we have gone through all the Scenarios and selected the scenario  number two which is related to th...