A Decentralized Voting Application Using Blockchain

Objectives Understand the shortcomings of the current voting system Appreciate the benefits of a decentralized voting system and the problems it solves Deploy a smart contract using Ethereum that carries out decentralized voting Things needed Remix: Solidity IDE Let’s Begin! Now that you have an idea about writing a basic smart contract using the solidity interface, let’s move on to a more useful application using Blockchain – A decentralized voting application. Problems with the existing voting system The traditional voting system is hosted by a centralized authority and takes place in a common centralized region where people in that region vote. In this system, there is a third party that coordinates the voting procedure. The major problems in this system of voting include people casting unauthorized votes, the same person voting multiple times, tampering of votes, and voting procedures not terminating after the allocated polling time is over. The idea here is to use blockchain technology to hold a free and fair election that addresses all the above mentioned issues in the current system. We deploy this using a blockchain to make the votes immutable and decentralized, preventing any tampering of data. So let’s get started. For simplicity, let’s start…

Read More



Sending Sensor Data to Thingspeak

In the previous post, we saw how to send some test data to the cloud. In this post, we will be sending actual sensor data to the cloud. For this, the sensors we will be using are a soil moisture sensor, and DHT11 humidity and temperature sensor. The objective of this experiment is to create an IOT based Agricultural solution which constantly monitors the water content of the soil and the temperature and humidity of the surrounding environment in which crops are being grown. Once all the data is obtained and sent to the cloud, the data will be interpreted and a water pump will automatically pump the required amount of water for the optimal growth of the plant. Pretty cool right? What will we be measuring? Soil moisture content in % of water The humidity of the environment in % Temperature in Celcius   Thingspeak configuration: To get started, create a new channel following the same procedure as described in the previous post. However, since we will be logging three different kinds of data (i.e., the temperature, humidity, and Soil moisture content), create three unique fields instead of two, and give them appropriate names. Hardware:  NodeMCU Board Soil moisture sensor…

Read More



Sending Data to Thingspeak

Now that you know what Thingspeak is and created your account on Thingspeak, let us have a look on how data is transmitted from your Arduino to the Thingspeak cloud platform. In this exercise, we will be sending some sample data to understand how the whole process works. Thingspeak also allows us to visualize the data we’ve transmitted in the form of graphs to better interpret our data. To start, log in to your Thingspeak account and navigate to MyChannels. It will look something like this: The screenshot above shows you a few examples of some ‘Channels’ to which your data will be sent. Click on ‘New Channel’ to create your first new channel to sent data to. Add a suitable title, description, and two fields as shown in the screenshot below. Each ‘Field’ will contain a specific kind of data. For example, to monitor temperature and humidity of a greenhouse, temperature data is logged to one field and humidity to another field. The number of fields corresponds to the number of different types of data you want to send to your channel. You may leave other fields empty for now. Once your channel is created, it will look something…

Read More



how to interface stepper motor with arduino

A stepper motor or step motor or stepping motor is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor’s position can then be commanded to move and hold at one of these steps without any position sensor for feedback (an open-loop controller), as long as the motor is carefully sized to the application in respect to torque and speed HOW TO INTERFACE A UNI_POLAR STEPPER MOTOR WITH ARDUINO hardware connections * The in_1,2,3,4 pins of the motor driver port is connected to the digital 2,3,4,5 pins of the arduino respectively . *connect the ground pin to the ground of the motor driver port to the ground of the arduino, and the negative terminal of the 5v  power supply to the other ground of the arduino (ensure that there is a  common ground between the arduino,motor driver port and the 5v power supply) connect the 5v power to the vcc of the motor driver *connect the 5 wires of the stepper motor to the motor driver port make sure that the red wire is connected to pin no 5 , yellow wire to pin no 4 , pink to 3 and blue to 2 of the arduino . programming the arduino There are 4 steps , in each…

Read More

Knowledge and Content by Li2 Technologies | © 2021 NASSCOM Foundation | All rights reserved