SIM900 GSM MODULE TEXT

#30 SIM900 GSM MODULE TEXT

Hi all, recently  I was thinking about the AT command. What’s the AT command you might ask? well it’s an instruction sent to a cellular modem. for example: It’s an instruction which is sent from any suitable device (in this case and Arduino and a GSM module) to a phone/modem or GSM module. you can request something to be sent back to you or you can send something to another supporting device.

The abbreviation for ATtention is AT. each AT instruction starts with “AT” followed by the rest of the command. An easy example is:

AT+CMGF?AT=meaning that it’s an AT command, +=An extended command, CMGF= Select SMS message format, ?=Query character.

Ok enough of that lets get into the project.

The goal is to send a message from the Arduino+GSM module to a mobile cellphone. This can be quite useful.. since you can use this message as a “trigger”  for almost anything examples can be hooking up a relay to open your garage door or triggering a servo to open a lock.

you can even program the Arduino to receive a specific message and to execute a series of commands apon receiving this message. the possibilities are endless. so I suggest you have fun 🙂

So we will need a few items to get this project going.

* Arduino Uno.
* GSM module (I’m using the SIM900)
* 4 Male to Male jumpers.

You can ignore the relay for this project!

1.
The first thing you want to do is download the Arduino IDE from this link.

2.
After you have installed the IDE you’ll need to paste and modify the included code into your sketch (save the sketch)

3.
Next you’ll want to burn the sketch onto your Arduino.

So now you need to wire up the Arduino and the GSM module.
Thankfully the GSM module already has a MAX232 chip embedded into the board so we don’t need to worry about RS232 communication.
take a look at the pictures below and wire up your board.

GND=purple goes to 5V GND on the Arduino.
RX=red goes to pin 8 on the Arduino.
TX= yellow goes to pin 7 on the Arduino.
Trigger=grey goes to pin 2 on the Ardino.

The trigger is triggered when pulled low to GND

power to the SIM900 board gets connected to +5V and GND on the Arduino.

Now all you need to do is pull pin 3 on the arduino to GND (this is the trigger, in this case it will send a SMS)

You can also list all the messages saved to the SIM card since the SIM card is basically a tiny computer in itself!
Awesome!

Well that’s it for now HERE is the code saved in a nice zip file for you guys.

BASE NUMBER SYSTEMS

#29 BASE NUMBER SYSTEMS

Well Base Number Systems are the whole entire system that our computers run on, Binary is a Base System. In this case Base 2.

Before the days of languages, such as C++, C, Visual Basic and so on, there was actually Intelligent people slaving away at computers typing up endless pages of machine code. If you want to know more about the history of Machine code and etc. Well the point I’m trying to make is that the average computer programmer, back then had done Degrees in mathematics. 80% of the time the programmers had degrees anyway, This degree in mathematics helped them understand the way a computer works, eg. the electronic pulses caused by the computers output of 1’s and 0’s. This being Binary.

The Language of Numbers.

At bottom, Computers understand only one language — the binary code of ones and zero’s that represent on-off electronic pulses. Because this code is so difficult for humans, programmers have built more concise ways of expressing the binary numbers that constitute, for example the contents of a computer’s memory or the address in memory of each piece of data. Two numbering systems that can serve as convenient short hand for the binary (base 2) are octal (base 8) and Hexadecimal (base 16). Hexadecimal is sometimes known as “Hex” by programmers. Because 8 is raised 2 to the third power ( 8 = 2 * 2 * 2) , one octal digit is the equivalent of three binary digits, similarly, one hexadecimal digit represents 4 binary digits ( 16 is raised to the forth power). The tables below list the decimal numbers 0 through 16 and there binary, octal, hexadecimal equivalents. In each system, the value of a digit is determined by the value of its place column. The letters A through F in hexadecimal represents the 11th through 16th digits in that system.

The process of Conversion

Decimal to Binary

Subtract the highest possible power of 2 from the decimal number – here, 4 from 5 – and continue subtracting the highest possible power from the remainder, marking a 1 in each binary place column where subtraction occurs and a 0 where it doesn’t . Here. one 4, no 2 and one 1 gives binary 101.

Binary to Decimal

Add the values of all the binary places occupied by 1s. Here, to convert the 12- digit binary number 100101101001, add the place values of 2048,256,64,32,8 and 1. The result is the decimal number 2409.

Binary to Octal

Starting with the rightmost digit, group the binary digits in threes, treating each three as a separate binary number with the place values of 4,2 and 1. The sum of each of trio’s place values equals one octal digit. Here, the sums of the values of each of the four groups are 4,5, 5 and 1, making octal 4551.

Binary to Hexadecimal

Again from the right, group the binary digits in fours, treating each four as 1 binary number with the place values 8, 4, 2 and 1. The sum of each group’s place values equals one hexadecimal digit. Here, the sums of the three groups are 9, 6 and 9, making hexadecimal 969.

The Principles Of Addition

Addition in Binary

Using the same rules as in decimal addition, start by adding the figures in the rightmost, or 1s column: 1 + 1. The result – 2 – is expressed in binary as 10 (one – zero). Write down the 0 and carry the 1. In the 2s column, 1 + 1 again equals 2, or binary 10;write down the 0 and carry the 1 into the 4s column. The result is 100, the binary equivalent of decimal 4.

Addition in Octal

Adding the figures in the 1s column – 7 + 1 – gives 8, expressed in the octal system as 10 (one – zero). As in binary addition, write down the 0 and carry the 1. Next, add the figures in the 8s column, the sum of 6 and 1 is 7. The result is Octal 70 – the equivalent of binary 111000, or decimal 56.

Addition in Hexadecimal

Adding the figures in the 1s column – 7 + 9 – Gives 16, the base of the hexadecimal system, expressed as 10. Write down the 0 and carry the 1. In the 16s column , add 1 to the D (13 in decimal). D plus 1 is E (14 in decimal). The result is E0 (E-Zero), Hexadecimal shorthand for binary 11100000, or decimal 224.

You can find more info about the hexadecimal number system HERE

TABULATOR JS TABLE LIBRARY

#28 TABULATOR JS TABLE LIBRARY

Tabulator Example

Tabulator is an easy to use, fully featured, interactive table JavaScript library.

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript Array, AJAX data source or JSON formatted data.

Simply include the library in your project and you’re ready to roll.

Tabulator has an enormous number of features to help customize your table experience to your needs.

With new features released every month, there is bound to be something to get your interactive table juices flowing.

A detailed breakdown of all of the available features can be found in the Documentation.

The easy to use, fully featured, interactive table JavaScript library.

SINGLE FILE PHP GALLERY

#24 SINGLE FILE PHP GALLERY

PHP Image Gallery Example

This is a web gallery in one single PHP file. All you have to do is copy the script to any directory containing images to make a gallery. Sub directories will be sub galleries. Thumbnails for images and directories are generated automatically.
Single File PHP Gallery does not require any configuration and is very easy to use and modify.

INI READER/WRITER C#

#23 INI READER/WRITER C#

Simple INI Reader/Writer

INI files are mostly used in C++ and Delphi programming these days. Microsoft’s .Net framework focuses on XML-based config files not INI files. However it is still possible to read and write to INI files using C#. In this example I have created a very simple INI reader. It allows you to read/write to the config file ini_reader_writer_20xx-xx-xx.ini .

There are plenty  NuGet packages, such as INI Parser. Which allow easy implementation into our projects. You could also write your own class which gives us more control but is overkill for an example. Example an INI file handling class using C#, P/Invoke and Win32.

GOOGLE CHARTS

#22 GOOGLE CHARTS

A Simple Google Charts Example

Google Charts allows us to display big data in a visually appealing way. Google offers animation and lots of other options to modify google charts. The charts are rendered using HTML5/SVG technology and the charts themselves are exposed as JavaScript classes In this example five different charts are drawn and are refreshed every time the page is resized using a simple line in JavaScript:

The Charts Are embedded in iFrames.

window.onresize = function(){ location.reload();}

On page resize the page is refreshed. Since we are using the charts inside HTML iFrames this works quite well.

USING A DLL IN C#

#21 USING A DLL IN C#

A very simple example of how a DLL can be used.

In this simple example I create a very simple DLL(Dynamic-link library) in C#. the library has to functions the first function is the Calculate method which allows us initiate a simple addition of the numbers in each numerical box.The second function is a logger to keep track of the addition problems we solve. The WriteLine method also shows us how we can write to and delete files in by calling methods from the dll_example_class_library.dll we compiled.

A simple method called Calculate just adds two numbers together using the dll_example_class_library.dll DLL’s help to keep code more organised and also allow us to change functionality of programs without recompiling the EXE .

After the DLL is compiled we can add it to our project by: right clicking Refrences, clicking add reference, clicking browse and selecting our DLL

In order for us to use the methods in our class it has to first be initiated. Once initiated we can start using the methods in our logic.