Sunday, August 3, 2014

Joystick Axis control with Pygame

Raspberry Pi joystick Pygames

As blogged before the screen image position controlling with joystick button are done. The good thing about electronic devices are that there will be many more things to explore further .Joy stick works as coordinates of the axis when we move it. Looks like its values moves from 1.0 to -1.0 . I am interested to control the screen image with this axis rather than buttons in the joystick.

Looking further on the documentation in Pygame - http://www.pygame.org/docs/ref/joystick.html


get_axis()
get the current position of an axis
get_axis(axis_number) -> float
Returns the current position of a joystick axis. The value will range from -1 to 1 with a value of 0 being centered. You may want to take into account some tolerance to handle jitter, and joystick drift may keep the joystick from centering at 0 or using the full range of position values.

The axis number must be an integer from zero to get_numaxes()-1.



Saturday, August 2, 2014

DHT11 connected to Raspberry Pi to measure Room Temperature & Humidity

As always the difficult part while interfacing a device especially sensors is  the signal decoding. I always felt difficult to understand the specifications of a electronic device.

DHT11 decoding code and instructions I got from the below link 

Raspberry Pi and DHT11 connection Diagram:


I just followed the instructions and finially I measured my room temperature and humidity.







Wednesday, July 30, 2014

Ordered a DHT11 to connect with Raspberry Pi

Today I have ordered DHT11 in ebay.Just need to do some experiment with GPIO pins on Raspberry Pi in input mode.




DHT11 Temperature and Humidity Sensor features a calibrated digital signal output with the temperature and humidity sensor complex. Its technology ensures the high reliability and excellent long-term stability. A high-performance 8-bit microcontroller is connected. This sensor includes a resistive element and a sense of wet NTC temperature measuring devices. It has excellent quality, fast response, anti-interference ability and high cost performance advantages

DHT11 timing diagram:
DHT11 connection Diagram:

Waiting for it to come.................................