DePin (Decentralized Physical Infrastructure Networks) is a new approach to building and maintaining physical infrastructure where network participants provide hardware or services and earn microtransaction payments on the blockchain. This video demonstrates how to integrate hardware with Solana smart contracts using QR codes, showing practical examples like controlling a Raspberry Pi LED and building a Solana bar that dispenses beverages when users scan QR codes. The video also introduces LoRaWAN, a low-power, long-range network provided by Helium that enables decentralized sensor networks for applications like tracking, monitoring, and controlling physical devices through smart contracts.
Building Decentralized IoT Systems on Solana with DePIN
Added:hello everybody today we're going to talk about hardware and Solana especially how you can uh take Solana to control hardware and how you can use Hardware to control a smart contract so the first thing we're going to learn is what dpin actually means then we're going to learn how you can control a Raspberry Pi pin with uh via Smart contract and Solana pay QR codes then I'm going to show you how you can build your own vending machine or a bar or a cocktail mixer and then we're going to look at the laavan network which is a network that is provided by helium and it has a very high range and low power consumption so let's look into this so what means deepen actually um I found a definition of it it's a new way to build and maintain infrastructure in the physical world and what it basically means is that there's a network and a bunch of people provide some kind of functionality and kind of Hardware or network or whatever and these people get paid by um microtransactions on the blockchain so and a few examples that we already have on salana is the helium Network for example helium provides um a lauran net I going to explain later what this is and a Sal Service uh which is already available in Miami so you can get a mobile Sal service for only $5 so that's an amazing project and then there is a project called render which lets you rent out your graphic card to other people for usage so they pay you a little bit of money and they can use the processing power of your graphic cards then there is a project called hi mapper which is also super interesting how it works is um you have a little camera in front of your car you drive around and you send out the map data that you're collecting while you're driving so it's a great way for people like um Uber drivers or taxi drivers or anyway people who drive a lot to make a little bit of money and then people can buy this map data and use it and this is how the people get paid so this is how the economics of these networks work the same for the helium service it's like you have your hotspot at home you provide coverage for your area and then you get paid for the people who use it then there's another project that's currently being built for hyperdrive is called Shaga which lets you rent out your gaming PC to other people to use and then there's a nice project which is called cut and tracker you which is German and means cat tracker and they have like tiny lovan devices um to track cat bikes uh cars Etc so you can already see there's a bunch of cool lauran stuff here which we come to later but first let's see what um what would be the hello world of Hardware integration with Solana so um one of the examples we built is uh how you can control a Raspberry Pi with Solana pay QR codes here you can already see there's a little QR code here and there's a Raspberry p and an LED and all you need for this is a Raspberry Pi then you you use the JavaScript package uh it's called onoff and then you have a websocket connection and then you use these Solana pqr uh codes to change the state on chain and now I going to quickly show you how this works so this is the repository for the deepen examples and we're now going to look at the first one the LED switch and the LED switch looks like this so uh here's a little video of it so we scan this QR code and transaction pops up on your phone and the LED switches on and then you can scan another QR code and the LED switches off again and yeah in this example here you have first have the hardware requirements then you have the setup of the Raspberry Pi then here you can see exactly how you need to um put the cables in so I have it here as well and so basically you connect um one to the ground and one to pin 18 and then uh in the Rasberry Pi how it works it runs a JavaScript on it and it listens to the account of the onchain program that is changed by these QR codes and whenever the value is off then it switches this little pin here the pin 18 um off so there's no power so the LD is off and if you scan the QR code then um the transaction assigned the state in the program changes and then the Raspberry Pi listens to it and sets this a pin 18 to true so this is a nice um way how you can um control Hardware with the Solana blockchain actually um I'm going to quickly show you the program because the program is very simple actually it's an Anor program so it's a program written on Solana and it has this switch function here and whenever this one is called it switches the account to on or off and then this is the script that will run on the Raspberry Pi so you just put it on the Raspberry Pi and started from there and here you can see it's using this onoff JavaScript package it Imports the Anor program IDL here and then here it uh loads the account the LED switch account and if it's true then it switches the LED on and otherwise off and then if you use connection.on account change this means that there will be a websocket connection to the RPC and whenever this account changes we will get an update so like this we can whenever the QR code is scanned it will automatically pick it up on the Raspberry Pi so this is the first example I wanted to show you and the second one is um the Solana bar so it's very similar to the first examples it's also using a Raspberry Pi and here you can already see there's a pump involved now this time and a little 9vt block and then here on the right side we can see the final product so you all the Raspberry Pi and the hardware stuff and the power bank is stuffed into this little chest and only a cable goes out and goes into this teot here and when you scan this QR code it will activate the pump for a certain amount of time and there will be coming some wine out of this um out of this uh beverage container here and then um yeah you can drink it and now I going to show you how this example Works um it also comes with this app here this is a nextjs app which you can very easily start by going into the app folder and typing yarn Def and now if I scan this QR code here it will actually um create a new new receip it puts it here into this list and the Raspberry Pi has a different a little bit of different script this time it listens for these receips and so now I approve this we can see this is turning green and now I have another receip here on chain and the Rasberry Pi is listening for these receipts and whenever there's a new one it switches on the pump for 5 seconds and afterwards it calls the same program and says hey this uh this um order has been delivered and then he sets the value to true yeah and like this you can uh build all kinds of things so it doesn't necessarily need to be a 9vt pump but you can there's many things that you can attack attach so there's for example this solenoid here which also has a cable so you can switch this on and off and have like a water flow if you want to water plants for example in your garden or there's a little motor that you can attach and um these motors you could for example use to control a car um and then you could use Solana pay QR codes to control this car and drive it around or here's another one of these pumps that you can use um then you can for example build yourself a decentralized bar where like lots of different liquids are ped into glass and then you have a cocktail and yeah now let's come to lauran um because this Rasberry pies um they are really nice so um but they have the problem that they have a quite high power consumption so even if you attach it to a power bank you only have like um few hours or maybe uh one or two days of um Power for this thing but there's another thing which is called um lovan sensors let me see if I can find mine here so this is a an a lovan sensor and these lovan sensors have very low power consumption so here's two batteries in this batteries in this and this will hold for up to 5 years and and yeah so lovan is a decentralized network provided by helium so there's a bunch of people in your city probably already which have these uh helium hotspots in their houses and they are actually getting paid for providing this coverage of network they call it uh proof of coverage and um people pay for data credits so you can buy thousand data credits for I'm not 100% sure maybe a dollar or something and then they burn some nht tokens and the people get paid for providing this coverage and everyone can just use it this is the coverage how it's um how it was today so you can see Europe and the United States are already very well covered and also some parts of China and India and so on and yeah the coverage is becoming bigger every day currently and yeah it has a super low power it has long range it has deep indoor penetration it's actually running on a license free Spectrum below 1 GHz in the megahertz spectrum and um yeah everyone can use it and it's secure because these uh the data stream is actually encrypted and here you can already see where it ranges in the different networks so on the top left we have the Wi-Fi then on the top right we have uh 4G and 3G and on the bottom right we have um the Laura Network so it has a very high range but it has a very low um data throughput so you can um when I open this sensor it just sends like a few bytes to the next hotspot and then they arrive in the helium console and then I can use the data of the sensor um so you can't use it for streaming something for example or for uploading and downloading lots of data but it's very well suited for having sensors temperature sensors humidity sensors all kinds of sensors distance sensors and so on here already said it's like in this free sub gahz um frequency spectrum and uh it's quite funny how the uh um the modulation of the frequency works it's kind of like uh What uh bats and dolphins do in nature so it's like this chirping so here you can see like uh whenever the sensor wants to send something what it does it does eight chirps eight up chirps and then two down chirps and then it's allowed to send this data to the hotspot and yeah now we going to show you this uh lovan sensor how it works so this is the um Solana bar example here so it's scanning this QR code here's the C Rasberry Pi in the box then we scan this and as soon as the transaction is approved the um the pump pumps the wine into the glass there we go and this is how the laavan sensor works so here you can see uh in the video I I open the sensor this means the sensor sends its data hey I'm now open to the next helium hotspot then it arrives in our next JS uh API and from there I can then do whatever I want with it and in our case what we do with it is we are opening um the chest so this example is a lovan chest and here we can see this is the program so we have the switch instruction which says hey the chest is now open or closed and then we have the loot instruction so when we scan the QR code in the chest then um we get the in uh what is in the chest we can loot with our phone with the Solana pay transaction request but um if the chest is closed then here we can see then the program will Panic so we will not be able to scan it anymore so it will only work actually if the chest is physically open we are only then allowed to loot the chest so and um let me quickly show you the API for that it consists of two scripts there's a sensor down link and this means whenever the uh our helium console here you can in the helium consoles you can register these sensors then you can plug it into a decoder and then you can have an HTTP web hook which calls your API and here we can see as soon as the um con calls here our post request what we do is we have a key pair here in the um in the browser saved and then we um add uh instruction to switch either the chest account to true or to false and then in the program it will always check hey am I allowed to loot or am I not allowed to loot and yeah they can find the whole documentation of this uh in the repository salana deepen examp exles there very detailed described what all the different um classes do um so I will not go too much into detail here but if we loot the chest we add a transfer instruction and we add the loot instruction and um yeah we only allowed to loot the chest when the chest is actually open and yeah now I would like to go a little bit into some brainstorming with you guys so let's see if you find some good deepen ideas so one thing that you could do for example is you could have um a bunch of lauran distance sensors put them all around the city in the parking spots and then check where cars are and then you have an app which shows where free parking slots are and then you sell these to um this app information to other people who are searching for parking lots so this would be very helpful for me because sometimes I was driving around for half an hour in the night to find a parking spot then you could use it to can could have a light sensor in rooms and offices for example to check if if it's occupied or um to calculate rent for example then you can also have down links so um when the sensor sends its data out to the network it's called Uplink and when the network sends data to the device then it's called a down link so you can also write a script for example which controls one of these sensors or one of these um one of these things for example this is a a cube cell so it's a very tiny um sensor which can also listen to lauran signals and then you can uh with these you can then control like a little Moto again or an LED or something so you could also build a vending machine with lauran for example or you could control a car or a drone with it and um another thing you could do is you could have a live stream like you build a few robots that are controlled by QR codes or lauran sensors and then uh yeah you let them fight each other or you could have a live stream where people can scan a Solana QR code to feed a hamster or to let a piano play or whatever like this then you could build um which would also be very nice uh a smart package so you have like a tiny um GPS tracker or a lauran Tracker in a package and then when it's sent to someone then they can immediately see when it will arrive so that would be really cool or you could have a warning system for catastrophes like fire humidity earthquakes and then have a warning system for the government or or you could build a vending machine I think I said this already but um you would scan a QR code and it would uh open um start a stepper motor which starts one of these Spirals and then um what you want to buy falls out or you could build a decentralized renewable energy system where people have like their solar panels on the roof and they have produced too much energy and you have some kind of sensors on it and then automatically distribute the energy in kind of some to conformed from people to people in the village so this would be really cool it's a challenging one but this would be very interesting and then you could build a bunch of games within it of course as well so you could have for example a bunch of censors in a in a city and people need to switch these buttons at the same time or you could have these uh lovan chests in multiple places and then people need to then you have a high score who collected the most of these chests or you could have robot wars like I said already you have a bunch of robots fighting against each other or you can have a um like a big wall and then um people need to press buttons scan QR codes um throw balls somewhere and all these are collected by sensors and controls um data in a program and then you pay out rewards for example or a decentralized Pokémon because sometimes uh in these uh Pokemon collecting games it's difficult to figure out if the people are actually at the position where they are but with lovan sensors you can be sure that they are at the right position or you could build a coin doer game so that would be also really fun like you have a QR code on the machine and you pay one usdc for example a coin Falls in and then it falls out and in the bottom you have sensors again which check all the coins and then you pay automatically pay out the rewards again so this would be also really cool so yeah I'm very excited to see what you guys are building with it you can find all these examples and uh with a bunch of documentation and videos on so on in the Solana deepen examples and yeah please uh comment below on the video uh if you have any other ideas uh what we could build with this and yeah have fun and good luck with hyperdrive if you're participating bye-bye
Up Next

Helium (HNT) Network: IoT, Proof of Coverage, and Decentralized Wireless
@Cryptobie
914 views•2022-06-30

Hybrid Key Establishment in Production: Post-Quantum Cryptography
@durumcrustulum
14.7K views•2025-08-27

Understanding Solana CPIs: Cross-Program Invocation Tutorial
@SolanaFndn
4.2K views•2022-09-08

Understanding Ethereum: A Comprehensive Beginner's Overview
@99Bitcoins
3.1M views•2018-06-26
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Blockchain & Crypto





![Fundermentals: Accounts, Instructions and Transactions [Solana Basics Day2] - Feb 7th '26](https://i.ytimg.com/vi_webp/fXKyOrudpgA/maxresdefault.webp)






![[Solana Bootcamp Summer 2024] #1 - Kick off | Introduction to Solana](https://i.ytimg.com/vi/8kkGIod41rg/maxresdefault.jpg)























![Solana Developer Bootcamp 2026: Learn Blockchain and Full-Stack Crypto Development [Full Course]](https://i.ytimg.com/vi_webp/2pcm7ICRJKU/maxresdefault.webp)