Monday, 23 May 2016

Python app that can control GPIO


                        Python app that can control GPIO

I have done a Python app which can control GPIO of a microcontroller.
Here in this project I have tried different options to do a app in python in step by step process .i am trying to control LEDs using different options that provided by python GUI(graphical user interface), here you replace the LEDs with motor  or any output device ( with some drivers IC if required), but the process of doing app is same.
Why python and MSP430G2?
I think MSP430G2 is one of the  best development board by TI (Texas Instruments) with ultra low power microcontroller which is have 5 low powered mode by which battery life can be extended, which is also having 16 bit RISC CPU .So it is more preferable that other MCU’s where you need less battery consumption and maximum code efficiency.
Python is easy language to start with and it can be used for many application  its supports many domains like internet protocols, web developments, Scientific and Numeric Comuting,Desktop GUI, Software development etc.,
I’ll try doing this project in step wise:
Step1: 1st I need to create a simple GUI (graphical user interface) using python, for this you need to import the TKINTER library it is a GUI toolkit which come along with python no need to download it again, in that (TKINTER lib) you have different options to make your own creative GUI application, Tkinter library have various controls, such as buttons, labels and text boxes used in a GUI application. These controls are commonly called widgets.
              



Step2: now I have to create button icon to operate LED, in order to do that we have so many option in that I will go for radio button, in order to display my radio buttons we need to fallow a small syntax
In this step ill import the serial library so that I can operate my on board led by sending data ,When I click on led need to be ‘on’ when I click off led need to be ‘off’.



                                       

Step3: now I will create another button icon with color to operate LED.








 You’re always welcome to give me your valuable suggestion through comments, if you need more information regarding this please leave a comment so that I can answer you.


Saturday, 21 May 2016

Python communicating with MSP430G2


                            Python communicating with MSP430G2

I have done an interfacing with Python with MSP430G2.
 Why python and MSP430G2?
I think MSP430G2 is one of the  best development board by TI (Texas Instruments) with ultra low power microcontroller which is have 5 low powered mode by which battery life can be extended, which is also having 16 bit RISC CPU .So it is more preferable that other MCU’s where you need less battery consumption and maximum code efficiency.
Python is easy language to start with and it can be used for many application  its supports many domains like internet protocols, web developments, Scientific and Numeric Comuting,Desktop GUI,Software development etc.,
In this project I will try to operate the MSP430G2 with programming language called python.i will operate the on board led using python, for this u need MSP430G2 along with python software and pyserial library
I wrote a small code in python to send a character and I wrote another for MSP430 to collect the character that trying to send from the python through serial communications and the result is this!



After this I improve my coding and try to blink on board two led’s that is green and red with some time delay by sending two different characters .one for on the led other for off the led and the result is this !




                                          



Hurray it’s working …!

You’re always welcome to give me your valuable suggestion through comments, if you need more information regarding this please leave a comment so that I can answer you.


Friday, 20 May 2016

Python interfacing with MSP430G2(IR sensor)


                   
              Python interfacing with MSP430G2(IR sensor)

I have done an interfacing with Python with MSP430G2.
 Why python and MSP430G2?
I think MSP430G2 is one of the  best development board by TI (Texas Instruments) with ultra low power microcontroller which is have 5 low powered mode by which battery life can be extended, which is also having 16 bit RISC CPU .So it is more preferable that other MCU’s where you need less battery consumption and maximum code efficiency.
Python is easy language to start with and it can be used for many application  its supports many domains like internet protocols, web developments, Scientific and Numeric Comuting,Desktop GUI,Software development etc.,
In this project I try to read the physical world using programming language called python.
I think you are confused!
Let me explain it. I just try to read the physical world by using the IR sensor. This IR sensor communicates with your controller through serial communication.IR sensor gives the distance of the objects/obstracle, which can be seen in serial monitor. Now I try to display the same values what we are getting in serial monitor in python using pyserial, for this you need python software along pyserial library.
Step1:Msp430 serial communication:
First I Wrote a small code to display the values in serial monitor as shown in the figure
My code and board is working good, I try to print the obstacle distance in serial monitor



Step2: communicating with python
Now I have to import the pyserial library in to python and need to write a small code that can catch value of that is being displayed in serial monitor.
without obstacle IR range:



with obstacle IR range:

                                           



Hurray it’s working …!

You’re always welcome to give me your valuable suggestion through comments, if you need more information regarding this please leave a comment so that I can answer you.









Thursday, 19 May 2016

Python interfacing with MSP430G2


                     Python interfacing with MSP430G2

I have done an interfacing with Python with MSP430G2.
 Why python and MSP430G2?
I think MSP430G2 is one of the  best development board by TI (Texas Instruments) with ultra low power microcontroller which is have 5 low powered mode by which battery life can be extended, which is also having 16 bit RISC CPU .So it is more preferable that other MCU’s where you need less battery consumption and maximum code efficiency.
Python is easy language to start with and it can be used for many application  its supports many domains like internet protocols, web developments, Scientific and Numeric Comuting,Desktop GUI,Software development etc.,
In this project I try to read the Serial value of MSP430G2using programming language called python.
I think you are confused!
let me explain you step by step
Step1:Msp430 serial communication:
First I Wrote a small code to display the values in serial monitor as shown in the figure
My code and board is working good, I try to print the character in serial monitor



Step2: communicating with python:
Now I have to import the pyserial library in to python and need to write a small code that can catch value of that is being displayed in serial monitor.
Hurry it’s working …!


You’re always welcome to give me your valuable suggestion through comments, if you need more information regarding this please leave a comment so that I can answer you.