Archive

Archive for March, 2016

Wear Dreamers

March 14th, 2016 No comments
We are the dreamers
                    with a dream of flying high
We try to touch the sky,
                    And go to a boundless world.
We believe in what we are,
                    We do what we can.
Nothing can stop us,
                     because we are the dreamers.

              
Our dream is to built an INDIA,
                       which world will know.
We tempted to achieve our goal,
                       And eager to score it.
 Everybody will know us,
                       because we are the dreamers.
              
              
We dream to reach beyond the universe,
                       To the house of stars.
We and our knowledge,
                       that will make our dream true.
We never stops
                       because we are the dreamers.
Categories: oksbwn, poem, weardreamers, weargenius Tags:

Automated Audio Controller based on Arduino Pro Mini

March 9th, 2016 No comments

These are some of the images of the Audio Controller Module that i have designed for my Smart Home to provide audio feeds from many devices to one or many output audio channels. It’s a simple selector not a mixer. Later on I will pro
vide the Design and code files. Here are some Pics of the module…

Thanks Guys…

CRC16 Calculator using JAVA

March 8th, 2016 No comments

           CRC codes are numerously used fro error checking purposes. So many times working around Embedded Devices you will find CRC used in different communication protocols. So guys here i have written a piece of code to generate CRC16 using provid
ed packets in JAVA.

CODE:

package crcCalculator;
public class calculateCrc16 {
long hb_CRC;
long lb_CRC;
public long getHCrc()// Returns High byte of CRC
{
return this.hb_CRC;
}
public long getLCrc()// Returns Low byte of CRC
{
return this.lb_CRC;
}
public static void main(String[] args)

{
char[] buf={(char)1,(char)4,(char)4,(char)0,(char)1,(char)46};// Packets for which //CRC is to be calculated
calculateCrc16 c16=new calculateCrc16();
c16.CalculateCRC16(buf);
System.out.println( c16.getHCrc()+" "+c16.getLCrc());
}
public void CalculateCRC16(char[] buf)
{
long crc = 0xFFFF;
for (int pos = 0; pos < buf.length; pos++) {
crc ^= (long)buf[pos];
for (int i = 8; i != 0; i--)
{
if ((crc & 0x0001) != 0)
{
crc >>= 1;
crc ^= 0xA001;
}
else 
            crc >>= 1;                    
}
}
lb_CRC= (crc & 65280)>>8;
hb_CRC= (crc & 255);
}
}
Categories: Calculator, CRC, CRC16, IOT, JAVA, MODBUS, oksbwn, weargenius Tags: