Monday, January 25, 2016

My first ever Instructables - a PCB mockup out of cardboard

   This blog post is about my first-ever Instructable entry: a PCB mockup made out of cardboard. I will explane it better:
   I live in a third-world country (Brazil); as so, many of the materials have to be imported. I work with embedded systems development, so importing electronic components is basically a daily task for me. I basically buy most stuff from China and get free shipping, and it may take up to 90 days to a free-shipped material to get to my hards: this is because customs in Brazil are slow and tough at the consumer, always willing to tax us a bit more here and there.
   One of the biggest slow-downs of an electronic product development is the manufacturing (and iterations necessary) of the printed circuit board (PCB), because it is almost an "art" and most designers don't make it right the first time.
   So basically on a scenario where anything can take 90 days to make it to my hands from China, I cannot afford making big mistakes!; this is why I have come up with a cardboard-based mockup of my current PCB design, so that I can mechanically test it before sending it to the (PCB) board house.


   Of course (as it is simples plain paper and cardboard) you cannot connect it to and a power supply or the like; this technique is intended to mechanically-test component collision and positioning only!.
   You can find my full instructable on this link. Hope you like it and share the knowledge with your friends.

Wednesday, December 16, 2015

Professional Electronics Blog - FritzenLab

Hello everyone, how are you doing today? the end of the year is approaching fast, right?

   So I came here today to present you my newest venture: an embedded systems professional blog!. I just left my job at a tech company in Brazil to startup an electronics design house, and decided that in paralell I would run a blog.
   One of my passions is to learn electronics, and be able to teach people what I have learned; this is exactly what I plan to do in my new FritzelLab ( <3 ), be able to pass my knowledge to everyone that wants to learn; all of that in a free and open way. 

The blog will be written in Brazilian Portuguese (my mother language) because my target is the Brazilian market and its proeminent maker scene!. You can enter my blog in here: www.FritzenLab.com.br .  

Feel free to comment and suggest (even in English if you will!). 

See you all, 

Saturday, May 9, 2015

Mouser space travel challenge

Good afternoon everyone, how is your weekend going so far?

   Today's post is to talk about a challenge I entered: the Mouser Space Travel Challenge; it is a contest where you are asked to submit a picture (and a 100 words text) on what you would send to the moon, of something you think represents today's world. Mouser will pick two winners and send their picture and texts on a SDcard, on the first commercial mission to the moon!. My picture and text can be seen below. The links to vote on my idea are right under the picture.


I would like to send a microcontroller-based weather station to the “Astrobotic’s MoonMail”. The reason is split in two parts: 1) monitoring the weather has always been (and will be even more) important to know and control human pollution levels (by measuring CO2 emissions) and overall global temperature rise; and 2) microcontrollers are an important part of the increasingly automated world we live in: from more efficient refrigerators to geiger counters (used to measure atomic radiation levels), everything uses microcontrollers!. Sending my weather station to the moon would make human essence eternal for ourselves.

If you want to help me out and vote for my idea, you have until 06/05/2015 to do so, in THIS LINK

Friday, April 3, 2015

Prizes won on giveaways and contests

Hey everyone, how are you doing today? I'm feeling great this week. 

   I am a very connected and active member of forums (Arduino, Arduino Brazil, ARM community), active twitter user ( @embedded_clovis ) and follower of a bunch of +Google+ channels; all those connections often lead to get to know prize posts, giveaways, contests and all kinds of social activities. 
   Ever since I started being more connected to technology blogs/forums/websites I have entered a bunch of contests, even winning prizes!. The very first of them was a +Freescale FRDM-K64F board (May 2014), which I won by commenting about a project idea on Freescale's Google+. I have used it to develop a weather station datalogger, which can be seen here. The board can be seen below.


   Next prize I have won (around September 2014) was a +HACKADAY Prize T-shirt, due to having my #HackadayPrize project selected to the quarterfinals. The project can be seen in this link, and the T-shirt picture is below.



   The year of 2015 started very well for me, because I have won three prizes so far: the first is the DFRobot's Bluno Beetle, an Arduino-compatible Bluetooth 4.0 board (ATMEGA328+BLE): I proposed a project idea using it, that read "A sensor node for road running (recording variables like GPS position, acelerometer and gyroscope data, temperature, humidity, altitude). My final goal is to generate a DIY road running wrist watch!". Keep tuned on this blog to get along the development of the project. 


   Second prize I have won so far is a NXP LPC4330-Xplorer boand, due to having subscribed to the ARM MCU desing contest, which aims to advertise the power of ARM+Keil short development cycle. The board (seen below) features a dual-core ARM Cortex-M4, making it very good for audio processing.


   Third prize I have won this year is a SAM4L8 Xplained Pro board, featuring an ARM Cortex-M4, on a Prize post at the ARM Embedded Community forum. I have proposed making a DAQ (data acquisition) system; stay tuned in this blog to get along the progress of development. 


   If you guys like, I also have a project on the 2015 Hackaday Prize (#2015HackadayPrize), which is an Open source weather station called FacilTempo, and can be seen here. I appreciate suggestions and critique, as well as new ideas.

FacilTempo weather Station

Monday, March 30, 2015

Tilt-based led light

Hello makers, readers and curious!

   I´m here today to bring you a sort of toy I have made for the Arduino Day (March 28th, 2015). It is a simple tilt-based LED light (images below), and despite the fact that it features no Arduino (!?), it made me proud of my maker capabilities!. 


   The working principle is simple: depending on the  position of the tilt ball switch, the LED lights or not; you can check the schematic below. I have used the following materials:

- 2x 1.5V coin cell batteries
- 1x 100R/ 0,125W resistor
- 1x 5mm red LED
- Soldering
- Glue, to put the batteries together :) 

The original idea came from my mom, which is a special children's teacher, and it intends to stimulate and entertain them, and help them learn quickly.



I have not tested the toy with children so far, but will be glad to share the results with you when I do. See you guys next time!.

Tuesday, March 10, 2015

The Hackaday Prize 2015 !

Hello readers, how are you doing today?

   So I´m back to this blog after some time, now to spread the word about an incredible opportunity form the Hackaday website team: today is the beginning of a new Hackaday prize, the @HackadayPrize 2015!. This is a maker competition in which you can submit your idea to change the world (or just to water your plants more efficiently..), and for which there is a go-to-space first prize.


   I have entered a project in the 2014 edition, having reached the quarter-finals with mine `chip timing for running clubs´, you can see my project in here. For this year´s prize, I am planning to enter this open source weather station here, which features a bunch of sensors and communications options, all of that being supplied by a fraction-of-watt solar panel!.
   By the way, the 2014 champion was a project called satNOGS, satellite tracking stations. So if you guys have any project idea and would like to share it (and maybe win a trip to space and many other perks), enter the Hackaday prize now!. See you guys soon.



Monday, February 2, 2015

A bit more on Kickstarter Scams!

Hello loyal readers, how are you all doing?


   In today´s post I will talk again about those free-energy Kickstarter campaigns (projects that promise free electrical energy, bla bla bla); while editing the two previous post on the same theme, I started getting more and more interested in that subject: now I even try to think and understand by myself what makes those people create a campaign to fund a fantasy-like, free-energy project!. So let the games begin.

1- S.e.g. (electrical generator): they state "S.e.g. is short for super efficient generator, a clean, portable system providing electricity, good for outdoor filming sets, space.". Here is the link to the actual project on Kickstarter: http://kck.st/15PVfQe


2- Hydro Electrical stand-alone generator complex: they state "A generator complex powered by an enclosed water system that puts in motion a series of generators". Here is the link to the actual project on Kickstarter: http://kck.st/1BcC8J5


3- Quantum Energy Generator Los Angeles: they state "Liberating Humanity from Oil and Banking Cartels One Free Energy Device at a Time!". Here is the link to the actual project on Kickstarter: http://kck.st/1jxBCxe

4- Magnetic Free Energy Device Cut Down on your Bills: they state "converting Micro Electrical Frequencies into Low Voltage then Amplifying then into High Voltage that can be used to power a house". Here is the link to the actual project on Kickstarter: http://kck.st/1qY8Kr1


5- Bypass foil: they state "Perpetual Clean Energy from Ocean and River Currents! Your support will change the way the world produces energy. Help change the world". Here is the link to the actual project on Kickstarter: http://kck.st/15OARz3
------------------

Well, as you can see on the projects, every creator has a good intention to its creation; but none of them have taken into account the physics involved in the process of transforming one time of energy into another!; also none of them have really tested their idea, they are only asking for money to overcome the ´huge amount of money to put my idea into practice´. haha.

Monday, December 15, 2014

Free energy projects (scams) on Kickstarter (II)

   Hello guys and girls. After writing about "free energy scams on Kickstarter" on my last post I went even deeper on Kickstarter projects, searching for the tags: "free", "motor" and "energy"; surprisingly I found a handful of those  scams!.
   Now I am sure that the Kickstarter staff doesn't even bother chasing and cancelling (closing) those projects: all of them were kept open until their own end date; but of course NONE of them were successfully funded, due to the bullshit they represent. 
   See below a couple of those scams, most of them in form of "miraculous" motors. Also, I want to hear from you guys: feel free to comment your opinion and thoughts on this blog post and also on my twitter: @embedded_clovis .

1- Magnetically Driven Generator Motor: they state "Hire the engineers needed to refine the design and build a small scale prototype of a free energy motor". Here is the link to the actual project on Kickstarter: http://kck.st/UgcK6q


2- Test rig for Edwin Gray free energy inverter: they state "The goal of this project is to build and test some Edwin Gray components in the light of new theoretical approach to Free Energy". Here is the link to the actual project on Kickstarter: http://kck.st/1DLZ9pF

3- fuel - free engine: they state "Fuel-free engine for power generation with capacity up to 10 kW/h". Here is the link to the actual project on Kickstarter: http://kck.st/1A1Y0X5

4- FREE ENERGY: they state "THERE WILL BE FREE ENERGY! THE OVER-UNITY CONTINUOUS MOTION ELECTRIC GENERATOR IS REAL!". Here is the link to the actual project on Kickstarter: http://kck.st/1nv3rbi


5- Free Electricity Device R&D: they state "Crystal Power Cell research and development. Possible infinitely charged electricity source, aka Free Energy!". Here is the link to the actual project on Kickstarter: http://kck.st/1maCuZ7

6- Dynevo Drive: they state "A self rotating motor to replace current electrical production methods". Here is the link to the actual project on Kickstarter: http://kck.st/1wpQZza

7- POWER GENERATION THROUGH INNOVATION: they state "Support innovation and change the world in support of freeing all from rising fuel cost. Free and clean energy is in demand". Here is the link to the actual project on Kickstarter: http://kck.st/1rOEOZz


Saturday, December 13, 2014

Free energy projects (scams) on Kickstarter

   I love technology; I also love Kickstarter and its huge collection of useful/inventive/creative projects. I myself have backed half a dozen projects in there (including OUYA). The problem is that due to its popularity, Kickstarter faces a bunch of confidence tricks' attacks (also called SCAMS). As a technology guy, I have listed below a bunch of projects (some of them cancelled, all of them unfunded) promising free energy.
   Notice that I will not fully explain exactly why every project is a SCAM, but you can guess that yourself, base on a bit of physics. Of course you know that there is no way to break physics laws (so far), so none of these projects will see daylight anytime soon. have fun!.

1- Powerful Box: they state "We aim to bring you free electricity after the upfront cost and produce no co2". Here is the link to the actual project on Kickstarter:  http://kck.st/1upAsbt



2- Magnetic Siphon Electric Generator: they state "My invention uses a series of magnets to lift and/or attract Ferrofluids and converts potential kinetic energy into electricity!". Here is the link to the actual project on Kickstarter: http://kck.st/1A9QL3O



3- HISCORE Engine Project*: they state "Environment protection technology.Help us build our new green engine prototype to reverse CO2 vehicle emissions pollution on our planet". Here is the link to the actual project on Kickstarter: http://kck.st/1tRj03F *this one was suspended by Kickstarter



4- iPOWER by design: they state "A remarkable new way to produce energy. By backing this campaign you will part of a Globe change that our World desperately needs". Here is the link to the actual project on Kickstarter: http://kck.st/1wOlEcS


___________________________________________
And the Bonus one: 

5- Time Machine*: they state "Help me make a time machine, so that we can make this world a better place. If you could go back, would you save her? Humble words". Here is the link to the actual project on Kickstarter: http://kck.st/1lRh3fh . *No comments on this one!.




Thursday, November 20, 2014

Open source - explained in LEGO!

   Browsing the internet (as I do every single day of my life) sometimes exposes me to some very interesting stuff; as for example this video (below), explaining with LEGO (in stop motion) how does the Open source movement works. That's some worth-watching-content, for sure!.





Tuesday, October 21, 2014

A substitute for the DELAY function - Arduino

Hello guys, how are you doing today? 

   Ever since I came across the Arduino platform, I felt really pissed off with (the existence) of the delay() function, because it was created with the (evil) solo purpose of wasting time between executions of the loop() function. 
   I have rapidly created a counter to substitute this function in every sketch of my own, with the downside of having to adjust the counted number for every single program (because different program sizes take different times to be executed). This scenario have just changed, because I am presenting you my very own professional way to not waste precious time of your Arduino. It is a sketch that allows you to run a piece of code every 'x' microseconds while leaving the rest of the time free for execution of more code!. 
   The code takes advantage of the micros() function, present in the stock Arduino language and IDE, which returns the time (in microseconds) that Arduino has been running since the last reset. Essentially what I do is to execute my main function (which I can freely choose) only every given time; this "given" time can be adjusted by updating its value (in microseconds) in an IF loop.

   The sketch is available on my GitHub and doesn't require any special library or installation, only the stock micros() function. Essentially your custom code, such as blinking leds, goes in between the quotes I have wrote (as seen below): 



   The main advantage in this code is that you can execute a code every 'x' microseconds (utilizing the sketch exactly as it is) or multiple codes every 'y' microseconds (by adding new IF conditions based on the same couter). You can not forget to fill your setup() function as needed; your timing will always be respected, since you don't write a code big enough (that takes more time than your delay) to be executed. 
   
   I would greatly appreciate to hear from you guys, any suggestion, criticism, upsides, downsizes, anything that can make the code work better. You can reach me on twitter @embedded_clovis or email: clovisf AT gmail DOT com .  

Thursday, September 18, 2014

Those are my thoughts about solar roads

So I am bringing something different for you guys today! It is a video that really reflects my thoughts on the recently-IndieGoGo-funded Solar roadways:



And they have raised over $2M dollars :) . 

Thursday, September 4, 2014

Beta-testing Arduino-ZERO

Hi guys, this is just an update post to tell you two things: 

1- I will be back to this blog once I go forward on my "chip tag for running clubs" project and once the things stabilize in the college (beginning of a new term is always crazy!).

2- I was selected as one of the Arduino-ZERO (link here) beta-testers! It has been so nice and so crazy test everything on that board, you have no idea. I have signed a waiver saying that I cannot share any information related to the platform, so I will only be telling you things related to this project when the beta-testing is over (and the product releases).

Stay tuned for news, and happy coding and hacking!! :-)


Tuesday, July 22, 2014

RFID tag reader with ARM microcontroller

   Good afternoon makers, and welcome back to Embedded-Clovis blog. Today I will show you one of the first steps in the make of my Chip Tag for every running club (click here) project: the RFID tag reader. It is a part of a Hackaday prize project I am in, so I think it is important to share it with you.
   RFID stands for Radio-Frequency identification and is a technology that reads/writes tag's (cards, keychains, tokens) contactless (by air); it may or may not feature a power supply in the target device, and when it doesn't have a power supply the energy for the target comes from the air as well (from the host device).
   I bought the module RFID-RC522 breakout board from a random seller on eBay, that features a MFRC522 RFID chip from NXP working on 13.56MHz; I also bought some programmable RFID cards/keychains for testing: the MIFARE 1K . I haven't tested recording data on it but this is surely the next step in my journey (since I will need that on my "Chip tag for runner's" project. 
   The schematic of my project can be seen below, featuring a Freescale FRDM-K64F development board, a RFID-RC522 module and an USB cable connected to my PC. Every time a card is ready (in a 2-3 centimeters range) its data is sent to a serial console on PC: I am using the Arduino IDE console on this project. 

click in the image to Enlarge

The wiring is done as follow: 

MFRC522 SPI_MOSI => PTD2 port of my board
MFRC522 SPI_MISO => PTD3 port of my board
MFRC522 SPI_SCK => PTD1 port of my board
MFRC522 SPI_CS => PTE25 port of my board
MFRC522 MF_RESET => PTD0 port of my board
MFRC522 3.3V => 3.3V of my board
MFRC522 GND => GND of my board

   There is a test code on GitHub here,  for reading tags and sending its information to the serial console of a PC. It is important to mention here that most of the code was taken from libraries and examples created by other users on the mBed platform (please refer to the GitHub link above for credit information).
   This was only the first step on the development of my summer project (Chip tag for running clubs), but I am sure it will help people get started with RFID technology. Having any question or concern, please contact me via Twitter: @ClovisDuino  or e-mail: clovisduino AT gmail .com . See you guys next time; have fun hacking and making!. 

Friday, July 4, 2014

Weather datalogger with ARM cortex-M4 - part1

   So, after blinking LED's and reading buttons I want to go further and deeper inside my ARM Cortex-M4 board: I am developing a data-logger for Temperature, Humidity and light level; It will store its data inside a micro-SD card, available on-board the FRDM-K64F I have.
   The sensors I have in my hands right now are the linear LM35 temperature sensor, the DHT11 digital temperature/humidity sensor and a LDR(light dependent resistor) for visible light level measurement. In the picture below you can see the setup of my experiment; it is  possible to see the big light-blue component (DHT11) aside with LM35 (the TO-92 case) and my Freescale development board with a microSD card connected to it. The LDR is missing in the picture, but is present in the actual prototype.


   Besides the sensors and microSD my board also features a Timekeeping chip, a Maxim DS1302 in a breakout board with a battery mounted on it; That chip makes my data-logging look more "professional" by keeping track of the time of every reading (or event). My code can be download from here and the schematic diagram is seeing below. 

Schematics- click the image to enlarge

   One reading is made every 10 seconds and the data is stored in the microSD card. I have tested the setup for several days, for as long as 21 hours every time. Turns out the system is very reliable: it can be seen below in the temperature plot that both sensors feature a similar behavior, validating the reading of both (analog for the LM35 and digital-serial for the DHT11).






Click in the images to enlarge

   I selected that specific period of time (5AM- 5PM) because it is the most interesting in terms of temperature and light level; There are some considerations to be done in here:

1) The temperature and the light level increase when 5PM gets closer, and that is because my room is facing northwest, so it starts getting a huge amount of sunlight around that time.
2) My light sensor (LDR) is not calibrated and I also don't know its characteristics, so I simply put a series resistor (1Kohm) with it; As a post processing I scale it to fit into a 0-5 arbitrary scale. Around 7:30PM (not on the pictures above) it reaches almost 4.5 with direct sunlight over it.
3) Some noise is expected to appear in the pictures above (as is possible to observe), as the system takes one measurement every 10 seconds. These pictures feature around 12 hours of data!.

   That was the part 1 of a series of improvements I am planning to make on that project; My next step will be using the network hardware available on-board (Ethernet) to send all that data in real-time for a web page I will create. Another piece of future work will also be powering the module with a solar panel (which I have bought already). And finally adding a rain sensor to it, so I can have a complete meteorological station in my house!. All of that was powered by this amazing Freescale development board (FRDM-K64F). 

Thank you guys and see you soon,

Thursday, July 3, 2014

A cheap Chip Tag for every Running club

Hello folks, 

   Today's post is about my entry to the Hackaday Prize, a competition that will take its winner to space :) . The objective of the competition is to make (and show the world how you did) projects that are in some way "connected": any kind of communication is valid. There is already a plenty of projects being showed there, and I think mine is a bit special: it is related to something that I love doing and will help me doing it better.
   I am talking about road Running; I have been running for three years now and I always feel frustrated when there is no chip-timing in the small races I participate, or even in trail or stairs races. Of course everyone can have a GPS-enable Cellphone or wrist-watch, but the first ones are not always comfortable to carry and the last one in not cheap enough for everyone to have it.
   So I came up with a hack solution (link here) that may revolutionize small running communities and clubs: An Arduino-sized device that reads RFID tags and communicates to any Android cellphone via Bluetooth. So every runner will only carry a small key-chain sized RFID tag and all the processing is done into the reader, that will finally send runner's time and name to an App to be developed on Android.


   The actual schematic for the project is seen above; I haven't started putting the hardware together yet because the parts are still being shipped to me, but have started the programming, that will probably be done into a Freescale FRDM-K64F board (features an ARM Cortex-M4 inside). 
   More details to come as I advance into the project. Get updated on my Google Plus: +Clovis Fritzen and my Twitter: @ClovisDuino. See you guys later, 

Friday, June 27, 2014

Leds and Buttons - Freescale FRDM-K64F

Hi makers, programmers and curious :)

   This post will be about my first contact with the ARM technology, by means of my newly arrived Freescale FRDM-K64F development board. As a good Arduino user the first thing I wanted to do with my board was to blink the RGB led it features onboard, so I did it!. The code I developed can be found here . I got a lot of help and examples from the mBed online compiler.

my first ARM-based project

   The blinking LED example from mBed website uses a "wait()" function which I don't like (because wastes processing time), so I developed my own code based on a counter that controls the "entering or not" in the blinking function. It is possible to notice in the gif image above that all the led colors are being lit, one after another; I was satisfied with the results, so I moved to the next step: adding buttons to it!. 
--------------------------------------------

   Again my code is very simple (and can be found here): when no buttons are pressed the blue LED is on; when the left button is pressed the LED turns green and for the right button the LED turns red. It took me only a few minutes to write, compile and test both circuits!.

buttons and LED's on my ARM board

I hope you guys are enjoying my blog, and I surely want to here from you. See you all soon.

My Brand-new Freescale Freedom board!

Hello everyone,

  Some weeks ago I entered a contest from Freescale Semiconductor, the Montain Mondays: the contest would give away 20 development boards for the ARM Cortex-M4 technology, every monday for five weeks (a total of 100 boards). The board were the FRDM-K64F , Ethernet enabled, onboard SD Card reader and Arduino form-factor. All I had to do is to suggest a possible application for the board. 
   The the board come to me by mail and I started to look around the internet for information about it: surprisingly there are tons of documentation and libraries, including some for most of the Arduino-compatible sensors and actuators. There is even  an online IDE/compiler for the ARM boards: mBed (which is fully compatible with my specific model of board). 

the tiny nice FRDM-K64F from Freescale

   The IDE has a nice design, is light and includes libraries that can be imported into your project almost automatically: if you compile your design without some specific (and necessary) library, the IDE will give you a warning, then you are driven to a search too where there is going to be a list of all "alike" libraries; just click on "import" and you are good to go!. 
   This board can be programmer through a system called "Open SDA", which allows you to simply drag your compiled program into a "disk", which is really the interface of the ARM microcontroller with your computer. It simplifies the process of flashing your device and makes it look nice and fast.
   I would like to thank +Freescale for sending me this board; And also would like to tell you guys that I have been working on a temperature and humidity Data-logger inside this board, which will also be Ethernet capable: and hopefully will become a fully functional meteorological station; More news and updates to come in the next few days. 

My project featured on SeeedStudio

Hello Makers,

   Last Tuesday, June 24th I had a project featured in a contest of Seeed Studio website: my 6-bit Arduino thermometer, that can be seen here. The contest consists of sharing your first maker project, and you can get $5 in credits to use in SeeeD Studio website. I found their initiative very nice, because it encourages other to become makers just like me, and turn the world into a better place.


   The project inside my blog: here
   The project on Seeed Studio: here

Monday, June 23, 2014

Second project - Temperature + humidity + LCD!

Hello coders, hackers, makers and curious visitors!

   The second project I worked on is a "temperature and humidity sensor with a LCD display" based on Arduino, the DHT11 serial temperature/humidity sensor, the LM35 linear temperature sensor and a 16x2 LCD screen. The project is similar to this one and features readings of temperature and humidity that are shown in a LCD display and sent via Arduino (USB- serial) to any PC terminal. Below I show a picture of the project working:

The prototype, when compared to Google Weather (upper right corner)

   The serial console (on arduino IDE) can be seen below, capturing successive readings from Arduino serial:

Screenshot of data captured through serial

   The complete schematic of this prototype is in the picture below; it was developed using Fritzing; You can download the schematic here



   The project was coded inside the Arduino IDE using some third-part codes, which I put together and made it work. The original codes are: DHT11 Library and LiquidCrystal . My code is available in the box below, as well as in this Github link.

/*
 Modified by Clovis Fritzen in June 11th, 2014:
 - The original program read the serial temperature/humidity sensor DHT11 (which is still part of this program); 
 - "Delay" function substituted by a counter (when the counter overflows the program enters the serial routine)
 - Added the LM35 (10mV/C temperature sensor) reading via serial, to compare both sensors
 */
/*
  Board           int.0   int.1   int.2   int.3   int.4   int.5
 Uno, Ethernet   2   3
 Mega2560   2   3   21   20   19   18
 Leonardo   3   2   0   1
 Due           (any pin, more info http://arduino.cc/en/Reference/AttachInterrupt)
 
 This example, as difference to the other, make use of the new method acquireAndWait()
 */
 
#include 
#include 

int idDHT11pin = 2; //Digital pin for comunications
int idDHT11intNumber = 0; //interrupt number (must be the one that use the previus defined pin (see table above)
long count= 0; // counter for spacing the serial writings
long AcqPeriod= 0;
int sensorPin = A5; // input pin for LM35 (10mV/C)
int sensorValue = 0; // variable to store the LM35 temperature
int led= 13;


//declaration
void dht11_wrapper(); // must be declared before the lib initialization

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(9, 8, 5, 4, 3, 6);

// Lib instantiate
idDHT11 DHT11(idDHT11pin,idDHT11intNumber,dht11_wrapper);

void setup()
{
  pinMode(led, OUTPUT);   
  Serial.begin(9600);
  Serial.println("DHT11 temp/humidity sensor - Example program");
  Serial.print("Lib version: ");
  Serial.println(IDDHT11LIB_VERSION);
  Serial.println("modified by Clovis Fritzen");
  Serial.println("---------------");
  
   // set up the LCD's number of columns and rows: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print(" DHT:|LM35:|HUM:");
}
// This wrapper is in charge of calling 
// mus be defined like this for the lib work
void dht11_wrapper() {
  DHT11.isrCallback();
}
void loop()
{
  
  AcqPeriod= 400000; // set here the interval in which data is sent into serial 
  
  if (count < AcqPeriod) // Still need to make sure what this number represents in terms of
                      // seconds or cycles of clock
  {
  count= count++;
  
  if (count < (AcqPeriod/2)) // just a routine to blink a led :)
  {
    digitalWrite(led, HIGH);
  } else{
    digitalWrite(led, LOW);
  }
 }
else
{
  
  //Serial.print("\nRetrieving information from sensor: ");
  Serial.print("\nRead sensor: ");
  //delay(100);
 count= '0';
 
 sensorValue = analogRead(sensorPin);
 sensorValue= sensorValue/2;
  
  int result = DHT11.acquireAndWait();
  switch (result)
  {
  case IDDHTLIB_OK: 
    Serial.println("done"); 
    break;
  case IDDHTLIB_ERROR_CHECKSUM: 
    Serial.println("Error\n\r\tChecksum error"); 
    break;
  case IDDHTLIB_ERROR_ISR_TIMEOUT: 
    Serial.println("Error\n\r\tISR time out error"); 
    break;
  case IDDHTLIB_ERROR_RESPONSE_TIMEOUT: 
    Serial.println("Error\n\r\tResponse time out error"); 
    break;
  case IDDHTLIB_ERROR_DATA_TIMEOUT: 
    Serial.println("Error\n\r\tData time out error"); 
    break;
  case IDDHTLIB_ERROR_ACQUIRING: 
    Serial.println("Error\n\r\tAcquiring"); 
    break;
  case IDDHTLIB_ERROR_DELTA: 
    Serial.println("Error\n\r\tDelta time to small"); 
    break;
  case IDDHTLIB_ERROR_NOTSTARTED: 
    Serial.println("Error\n\r\tNot started"); 
    break;
  default: 
    Serial.println("Unknown error"); 
    break;
  }
  
  lcd.setCursor(7, 1);
  // print the number of seconds since reset:
  lcd.print(sensorValue);
  
  Serial.print("Humidity (%): ");
  Serial.println(DHT11.getHumidity(), 0); // ", 0" represents the number of decimal positions after the comma

  Serial.print("DHT11 Temp (oC): ");
  Serial.println(DHT11.getCelsius(), 0); // ", 0" represents the number of decimal positions after the comma
  
  lcd.setCursor(13, 1);
  // print the number of seconds since reset:
  lcd.print(DHT11.getHumidity(), 0);
  
  Serial.print("LM35 Temp (oC): ");
  Serial.println(sensorValue);
  

  //Serial.print("Temperature (oF): ");
  //Serial.println(DHT11.getFahrenheit(), 2);

  //Serial.print("Temperature (K): ");
  //Serial.println(DHT11.getKelvin(), 2);

  //Serial.print("Dew Point (oC): ");
  //Serial.println(DHT11.getDewPoint());

  //Serial.print("Dew Point Slow (oC): ");
  //Serial.println(DHT11.getDewPointSlow());
  
   // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(1, 1);
  // print the number of seconds since reset:
  lcd.print(DHT11.getCelsius(),0);
  
   }
  
  }

   I just want to share some notes with you:
- Both the DHT11 and LM35 have a "step" (or resolution) of one degree Celsius, meaning they cannot read something like "26.3"; They a only capable of reading numbers with no decimal (e.g: "26").
- The contrast of the LCD screen can be adjusted by means of the potentiometer; Its backlight is always on (last two pins of the LCD on the schematic above).
- The circuit works independently on the presence of the USB cable on Arduino; it means that it will work on batteries for example!. in this case only the serial readings will be missing.
- The is a blinking led on pin 13 of Arduino (which is assemble on the board); That one is there just for fun.

   I hope you guys are enjoying my posts so far, and trying to validate my projects by doing it yourselves. If you have any suggestions/ recommendations or critics, please feel free to talk to me on Twitter, Google Plus and Facebook, as well as in the comments below. See you all next time!.