e.preventDefault(); // Prevent form submission input.blur(); // remove focus input.value = ""; // optional: clear the input

Hardware as a Service Using Blockchain And IoT

Introduction:

Hardware as a Service (HaaS) is a service providing model for hardware that is defined Separately in managed services and grid computing contexts. In managed services, HaaS is very close to licensing. In Grid computing, HaaS is a pay-and-go model. Here we are using HaaS to deal on hardware sensor values.

Required programs we have to implement are:

  • solidity smart contract.
  • event listening program.

Required packages to run:

  • web3
  • rpi.gpio

First of all we have to write the solidity smart contract program in the point of  get and set  functions which is compiled in the remix etherscan and deploy it by linking it with the metamask account and there itself we get the abi string and contract address.

After that we have to write the event listener program in python which listens the ethereum transaction happen to that contract address and it displays the triggered event set value .In that program we are using AWS IOT MQTT CLIENT which is used to publish a message to an aws topic. Here I am publishing the gpio pin value as a message to aws iot topic. And also I am using the set value as the raspberry pi value.

And also I wrote this program in such a way that the publish will happen when the transaction in remix is done and the publish will stop when the other transaction happens.

Flow chart:

Hardware as a Service Using Blockchain And IoT

Related Posts

Latest Posts

  • All Posts
  • Generative AI
  • manufacturing
  • News
  • Portfolio
    •   Back
    • Android
    • iOS
    • Java
    • PHP
    • MEAN
    • Ruby
    • DotNet
    • IoT
    • Cloud
    • Testing
    • Roku
    • CMS
    • Python

India

Plot No. 11/2, Phase 3, Hinjewadi Rajiv Gandhi Infotech Park, Pune, India – 411057.
info@tudip.com
+91-96-8990-0537

United States

1999 S. Bascom Ave Suite 700, Campbell CA. 95008, USA.
info@tudip.com
+1-408-216-8162

Canada

64 Caracas Road North York, Toronto Ontario M2K 1B1, Canada.
info@tudip.com

Mexico

Calle Amado Nervo #785 Interior B Colonia Ladron De Guevara 44600 Guadalajara, Jalisco, Mexico.
info@tudip.com

Colombia

Cra. 9 # 113-53 Of. 1405 Bogotá D.C., Colombia.
info@tudip.com

UAE

Tudip Information Technologies L.L.C Office No 109, ABU HAIL BUILDING 13, Abu Hail, Dubai, UAE.
info@tudip.com

Nigeria

22 Kumasi Crescent, Wuse 2, Abuja, Nigeria.
info@tudip.com