O'Reilly logo

Internet of Things Programming with JavaScript by Ruben Oliva Ramos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Measuring the level of alcohol with a sensor

In this section, we will build a very cool project: Your very own Alcohol Breath Analyser. To do that, we are going to use a simple Arduino Uno board along with an ethanol gas sensor:

Measuring the level of alcohol with a sensor

The following diagram shows the connection of the sensor with the Arduino:

Measuring the level of alcohol with a sensor

We are now going to write the code for the project. Here, we are simply going to go over the most important parts of the code.

You can now either copy the code inside a file called Sensor_alcohol.ino, or just get the complete code from the folder for this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required