Pages

Tuesday 29 January 2019

OreTechBlog: Limit and Beyond Limit

OreTechBlog: Limit and Beyond Limit:

@TeamOretes #SFH Our nation is now known as youth nation; we are somehow forgetting our youth icon. Let me share the thoughts of Vivekanandji (the real youth icon of India), he said that there are three types of work and also work can be done by someone due to three reasons.
  1. Work is for yourself
  2. Work is for others
  3. Work is for society
There is one more type called Nirguna karma as per Srimadh Bhagabat Gita
Let’s talk about first 3 types and its impact. Someday I will tell you about Nirguna Karma. The first one is definitely has many side effects if someone works only for him/her.  He/she will become selfish and narrow minded and also he/she makes his/her own limit unconsciously. If someone is working for others, it is termed as good work. It will give him/her internal peace, satisfaction for the achievement and respect from others. There is 3rd kind of work which is definitely better than 2nd & 1st, that is work for society. It gives you immortality and you feel as if whole earth is your family and you are just one of them. Someone will get love which is limitless or beyond limit due to this type of work.
Now the question arises why someone does and why not others .The answer stays within the reasons of work.  As I mentioned earlier, there are 3 reasons why someone does work. First one is work due to fear or pressure like the slaves do , wherein the efficiency level of that work is 33%.The second type is work out of greeds is for getting physical luxuries which gives you a result of only 66%. But the last one is work out of Passion wherein the people love the work they do. The 1st and 2nd type of work have a certain limit but 3rd one goes beyond limit and make its own bench mark.
Oretesians definitely do the work out of passion which will help us to go beyond the limits that will be seen by time.
“Love your work and go beyond limit.”
Keep Growing & Winning,

Saturday 14 March 2015

Arduino Wireless SD Shield Tutorial


As the name implies, the Arduino Wireless SD shield serves two functions. Foremost, this shield allows you to easily interface with Xbee transceiver modules to create mesh networks, and other wireless devices. Secondly, the micro SD socket allows you to store and access a large amount of data. Whether using these functions by on their own or together, this chip greatly enhances the capabilities of a standard Arduino. The best part about this shield is how easy it is to use. In no time flat, you can have its various components up and running.

Step 1: Plug in the Xbee

Plug in your Xbee modules in order to use the shield as a wireless transceiver.Make sure the module's pointy end is lined up with the edge of the board. If you are using the shield for wireless data transfer, you will need two or more of them.

Step 2: Plug it in:

Plug your shields into your Arduinos.

Step 3: Features

The wireless SD shield supports Xbee modules. These modules allow for easy wireless serial communication. A standard module has the range of 100 - 300 feet.
It also boasts a micro SD socket. This can easily be interfaced with the Arduino SD library. Unfortunately, this library does not come bundled with the Arduino development environment, so you will have to set it up yourself.
The shield also boasts a perfboard grid for prototyping your own circuit, and a micro switch for toggling between the USB port and micro SD port.
For more technical information visit its official Arduino page.

Step 4: Program the receiver

Plug one of the Arduinos into the computer. Make certain the micro switch is toggled to the "USB" option.

Upload the following code:
//Xbee receiver
//This example code is in the Public Domain

int sentDat;

void setup() {
  Serial.begin(9600);   
  pinMode(2, OUTPUT); 
}

void loop() {
  if (Serial.available() > 0) {
sentDat = Serial.read(); 

if(sentDat == 'h'){
          //activate the pumpkin for one second and then stop
   digitalWrite(2, HIGH);
          delay(1000);
          digitalWrite(2, LOW);
}
  }
}

Step 5: Setup the receiver

Unplug the Arduino from the computer. Toggle the micro switch from "USB" to "MICRO".

Plug the red wire from a 9V battery connector into the Vin pin. Plug the black wire into the GND pin.

Connect the positive leg of an LED to pin D2 and the other leg in series with a 220 ohm resistor to ground.

Plug in your battery.

It is now a standalone receiver.

Step 6: Program the transmitter

Plug in the Arduino for the transmitter. Make certain the micro switch is toggled to the "USB" option.

Before you upload any code to the Arduino, open the serial monitor. Type in "h" and hit the "send" button. The LED on your receiver should light up. You have made a wireless connection!

Fantastic.

Now upload the following code:


/*
  Wireless transmitter demo  
  Based on Button example code
  http://www.arduino.cc/en/Tutorial/Button
 The circuit:
 * pushbutton attached to pin 2 from +5V
 * 10K resistor attached to pin 2 from ground
 This code is in the public domain.
 */

// constants won't change. They're used here to 
// set pin numbers:
const int buttonPin = 2;     // the number of the pushbutton pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize serial communication:
  Serial.begin(9600); 
     
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);     
}

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {     
    //transmit a High command to the pumpkin and delay a second so that it does not receive more than one command
    //per button press
    Serial.println('h');
    delay(1000); 
  } 
}

Step 7: Setup the transmitter

Picture of Setup the transmitter
6B.jpg
Unplug the Arduino from the computer. Toggle the micro switch from "USB" to "MICRO".
Plug the red wire from a 9V battery connector into the Vin pin. Plug the black wire into the GND pin.
Connect a 10K resistor between pin D2 and ground. Also connect a push button switch between pin D2 and 5v.
Plug in your battery.
It is now a standalone transmitter.

Step 8: Prepare the SD card

Before you can use the micro SD card, it needs to be formatted to either FAT16 or FAT32.

On a Mac:
  • Connect your SD card
  • Open Disk Utlity
  • Select the Disk
  • Click "Erase" at the top of the window
  • Select "Volume Format: MS-DOS(FAT)" and hit "erase"
  • It is now FAT32 formatted
On a PC:
  • Open "My Computer"
  • Right-click on the disk and select "Format"
  • Select "FAT" and click "start"
  • It is now formatted to FAT16
Once the disk is formatted, the next thing you have to do is make sure that you have the SD Card Library. For instructions on how to setup the library, check out the bottom of Adafruit's extremely thorough micro SD card tutorial.

Plug the SD card into the socket on the shield.

To test the SD card, plug the Arduino into the computer and upload the following code:

/*
  SD card read/write

 This example shows how to read and write data to and from an SD card file
 The circuit:
 * SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 4


 This example code is in the public domain.
   
 */

#include <SD.h>

File myFile;

void setup()
{
  Serial.begin(9600);
  Serial.print("Initializing SD card...");
  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin 
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output 
  // or the SD library functions will not work. 
   pinMode(10, OUTPUT);
   
  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
  
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  myFile = SD.open("test.txt", FILE_WRITE);
  
  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to test.txt...");
    myFile.println("testing 1, 2, 3.");
// close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
  
  // re-open the file for reading:
  myFile = SD.open("test.txt");
  if (myFile) {
    Serial.println("test.txt:");
    
    // read from the file until there's nothing else in it:
    while (myFile.available()) {
    Serial.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
  // if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
}

void loop()
{
// nothing happens after setup
}









AT World Mobile Congress 2015 Yezz unveils Project Ara Modules

Smartphone manufacturer Yezz showed of a prototype of Google's modular Project Ara device at the
MWC 2015. The company claimed that the first Project Ara device will be launched in the next six
months. Google Project Ara modular phone comes with a total 11 modules including a screen module, camera module, processor, storage along with other smartphone modules.already in development and has discussions going on with other companies. It is working with Suncore on a folio case with a built in solar panel to boost the phone's battery life. The company is also in discussions with Toshiba about developing a camera module for the handset.

Yezz illustrated what the first Ara phone could look like, equipped with ten modules which the company called the Core Standard configuration. The device will have two module slots in the front- a 4.7 inch HD display and a small one at the top which will be filled by a proximity sensor/light
sensor/receiver. Users will be able to see notifications and the time on the lock screen, according to the company mock up. On the back of the phone will have a 5 MP camera module, and support for Wi-Fi, Bluetooth, a USB port, a 3G HSPA/SIM module and a "standard" battery. On the bottom
of the device will be a module for speaker, and a standard APU which will have a quad-core (1.5
GHz) chip with 1 GB of RAM and 8 GB of storage.

Marion Chaparro, Yezz’s Communication Manager stated that the company is developing modules that will go inside the phones skeleton. She stated, "We are developing modules which go inside the phone’s outer skeleton. It’s like a game, a Lego construction game." She added. “With Project Ara we are entering into a new era of mobile.” Chaparro stated that, “The idea is that consumers can choose modular components for every feature on their smartphone. This is the smartphone that adapts to your needs – from your professional life to your private life and your leisure life and, of course, your budget.” Google has been working on the project Ara since 2013 and the first devices are expected this year.

The internet giant is planning to do an initial test launch in Puerto Rico before a wider global rollout later this year. The smartphone is expected to be priced at $200.

Source: TomsHardware

Monday 29 September 2014

Use Raspberry Pi as a Game Server

            The Raspberry pi is a mini computer which is designed in a single board with all the essential components required for running an operating system. The Raspberry pi is a device which uses the Broadcom controller chip which is a SoC (System on Chip). This SoC has the powerful ARM11 processor which runs on 700 MHz at its core. This minicomputer comes without a display unit, but it can be used with HDTV display or normal NTSC or PAL standard TV screen. It has an Ethernet port which allows it to be connected to a network. Operating systems from Mac, Windows and Linux can be loaded in the Raspberry pi. The capability of this inexpensive board to load operating systems from Linux and accessibility of the board through a LAN network makes it a perfect choice for tiny dedicated web servers.
This article focus on how to configure the Raspberry pi board as a web server and the technique to make it serve a graphical game for those who type the IP or address of the Raspberry pi board from the address tab of their web browser. The Raspberry pi web server is available in the same LAN network or it can be made available to anyone who has the internet connectivity using the technique of port forwarding. 

In this particular project Ubuntu is installed on Raspberry pi board and is loaded on the Raspberry pi board and is connected to a router using a cross-over LAN cable. Hence the only additional hardware required with the Raspberry pi for this project is a LAN cable only.
Once connected to the router with Ubuntu OS on it, it can be accessed remotely from other systems connected in same LAN network. The board can be accessed from a Linux PC using the secure shell which is enabled in the Ubuntu of Raspberry pi board.  If the IP of the Raspberry pi board in the network is say, 192.168.1.5 then the following command can be used to login as the user named ‘pi’ in the Raspberry pi;
ssh pi@192.168.0.5
The password for the username ‘pi’ will be prompted and it is ‘raspberry’ by default. The same can be done from the windows system with the help of software like ‘PuTTY’ which can be downloaded for free. One might find difficulty in finding the IP address of the Raspberry pi board in the LAN and it can be easily done with the help of software like ‘Ip Scanner’.
Check the IP range of the router before further editing and it can be simply found by checking the IP of the system which is use to access the Raspberry pi board. For a Linux PC the IP address can be found by using the command;
ifconfig
and for a windows system the IP address can be found using the command:
ipconfig
Now add the following lines below that commented statement;
Make sure that the will set for the Raspberry pi board is not already in use for any other PCs and it can be done by using the ‘ping’ command from both Linux and Windows PC.
If there is no PC having the IP address 192.168.1.68 then the following ‘ping’ command should fail.
ping 192.168.1.68

Once logged into the Raspberry pi, the first think to do is to set a static IP address and it can be done by editing a single file in the Ubuntu. The file named ‘interfaces’ need to be edited and saved which is in the directory /etc/network. Open the file using the VIM editor and disable off the following statement;
iface eth0 inet static
The statement can be disabled by commenting it off like as shown below;
# iface eth0 inet static
If the IP of the PC found to be like 192.168.1.5, then write the following statements only
                                                                                           address 192.168.1.68
netmask 255.255.255.0
gateway 192.168.1.1
Save the file and it is suggested to restart the Raspberry pi board which will set the new IP address as 192.168.1.68.
If the IP of the PC found to be like 192.168.0.5, then write the following statements only
                               address 192.168.0.68
netmask 255.255.255.0
gateway 192.168.0.1


Save the file and it is suggested to restart the Raspberry pi board which will set the new IP address as 192.168.0.68.
Use the following command to reboot the Raspberry pi board;
reboot

Once the Raspberry pi reboots try to login using the new IP address.
The next step is to download and install the Apache server for the Ubuntu. It can be done using the following commands;
sudo apt-get update
sudo apt-get install apache2
Now simply copy the game folder in the directory “/var/www”. Change the permission of files in the game folder named say ‘game’, using the following command so that it can be accessed by others in the network.
chmod 777 game/*
Now open a browser in the PC and type the address of the Raspberry pi board in the address tab and start playing the game.
The Raspberry pi is connected to the port number 80 of the router and it can be forwarded to the internet by logging into the router and do the settings under ‘PORT FORWARDING’, the steps will vary from one router model to another.
Enable the forwarding of the port 80 using the following details;

Port to be forwarded : 80
Starting port number : 80
End port number : 81
Protocol : ALL or TCP/UDP

Find the public IP of the router also and if the public IP is say 123.238.112.227; then one can use the same IP to play the game from the Raspberry pi game server from anywhere around the world using a web enabled device.

Video: