Wednesday, October 19, 2011

LM92 thermometer in Android (App Inventor)

In this article, we will see how to control temperatures remotely via a Bluetooth link and how to receive events from remote activation of two buttons on our phone with Android. The versatility give us the integrated sensors such as LM92, combined with the practicality of any environment with a mobile device Android, lead us to devise items that previously relied on to carry a laptop wherever necessary to control and / or register events or conditions of work of a machine, an environment or any environment "that must be controlled." Today, thanks to Android, App Inventor to an elementary hardware and built around a 18F25K20 can control all this and more from the comfort of your mobile device.
In previous articles we could see everything necessary to achieve a link between your mobile device, equipped with Android, and a simple circuit based on a PIC, the powerful 18F25K20 that, thanks to the use of free software Amicus allowed us to receive instructions and data sent from your mobile device. The application, however simple it was, allowed us to achieve a "Hello World" LED lighting a distance. Of course that kicked off the excitement created us to try the backward, ie, transmitting to the device with Android, data generated in our test circuit. Addition of two buttons, we have included in this work a temperature sensor to receive additional data that distance adds more complexity to work, but it serves to imagine that we can exercise total control over a remote computer. That is, we show the potential of comfort that we can achieve, let alone laptops that were once the kings of the field work. Today, Android comes to occupy that place and that everything is easier, faster and convenient than before. Applications can now be developed in unusual areas. What you see in picture is the application that we have been developing for some items behind, with the benefit of receiving information in the mobile device from our circuit with microcontroller. Remember that you can use any microcontroller and any programming language, for convenience we use the PIC 18F25K20, but these examples can be transferred to any microcontroller. In this particular development, we read with two keys and the data string that sends the integrated thermometer LM92 to be presented on the screen of your mobile device. So far, our work is built on the App Inventor events press a button and it will continue with actions that were presented on the screen of mobile and data sent via Bluetooth to our remote development. These events occurred at a time in which "we decided to perform the action" and the pic looked HSERIN instruction to receive the data, interpret and execute the work according to the structure of the data sent. Now, it is our Android phone that should be listening and attentive, permanently, waiting for instructions or data that the PIC can send at any time HSEROUT command. It is very important to understand this: field application can send data at any time and Android should be alert always.