 Hello, I didn't see you there Hi, I'm Scott, and I just talking to this microphone cool How's it going friends? I'm here with with Adrian. How are you doing well? Thank you very much one of my top 10 favorite Canadians And we brought a bunch of things to show which I think would be fun Yeah, absolutely, and will you do I push the buttons or do you push the buttons push the buttons? Okay, so this is showing So what we want to talk about is is dot-net Specifically for tiny devices, right how tiny like I have a Raspberry Pi, but it runs an entire operating system Right, so the Raspberry Pi. I'm a huge fan of it's really it's a it's a tiny computer. It's a full micro Processors, yeah, we're gonna run dot-net on a micro controller. Okay, micro processor micro controller It's small, but like processor controller, you know potato potato Yeah, so think less power a lot less power so much more people running up battery doesn't require full operating systems We're not gonna have this whole Windows environment that we see on say a Windows laptop or a Raspberry Pi Okay So these don't boot into full operating systems that are multi-layered with kernels and drivers and hot and user mode in a shell Right. Yes, so essentially these end of being when you write your app for a micro controller You're in basically a single purpose Product you're running the application and the only thing that really needs to be running execution is your application Okay, this makes me think about how like we know when you run something in a container You don't necessarily run like a full Ubuntu and then you're turning up you run like alpine or something with a tiny surface area These little operating systems are they call real-time operating systems, right? They have a very small surface area, right? Yes, they do the minimum And so they do the minimum so your application gets the most the resources And they are constrained devices But it's well they also end up being very very stable It's really just running your application you boot almost you booting into dot-net effectively You're putting into a tiny operating system, which runs your one app. Yes, okay, and this case mono as well Can we share the screen or do we do a picture and picture? All right, cool, so this I'm not associated with this company. I just think it's really cool Wilderness labs they have like Netduino and meadow and what we're talking about here is meadows So it's a platform that runs dotnet standard 2.0 and dotnet standard 2.0 is really great because it means that it's C sharp code that you're writing to a standard that you know I could write a console app and it would do stuff I could write a console I could write that library and put it in the cloud or I could take a library and depending on how I wrote it If I wrote it to a standard I could put it on this tiny device Absolutely So you can use all the great C sharp skills that you've developed building mobile applications desktop applications cloud Applications and apply those skills to making IOT applications right right and one of the things that's really interesting about this idea of a microcontroller is that as as Brian from wilderness labs likes to say is it's going to become The dominant form of computing like there's more microcontrollers than there are like people Yeah, absolutely We think about this a lot in consumer world things like like nest and you know home automation But that's really a small portion of that market I think it's really it's industry and automation where there's huge numbers these devices already deployed We're see a really big growth in that area So when you think about internet of things these things are not necessarily going to boot into Windows or boot into Mac or boot into a boom To they're gonna boot into a tiny real-time operating system. Yeah, and I think the way I think about it is Often you don't need those full OS's and there are there are cases where you want that And you know like the point of cell system so they might have a little more functionality But for a lot of things running behind the scenes for automation We want those things super efficient super Super stable and and obviously very secure exactly and who needs the headache of an entire giant operating system when you can go And do something like this now let's think about specifications We know when the the raspberry pi has been $35 it's a micro Processor 35 bucks and it has you know gigahertz right mil quad processor gigahertz four gigs eight gigs of RAM look at this 16 megs of RAM 200 megahertz But it's also got Wi-Fi got Bluetooth and it can go and do things like JPEG acceleration But with these small specs I can still run a dot net application absolutely So jot net I think about as being either interpreted just in time compiled or ahead of time compiled How are we doing that? So we are running a full mono on this so it is oh, I make sure I'm gonna speak here But I believe we are it should be jet compiled and then Well in this case here We're gonna boot into this little application with a a build that we built locally and then we sent across the wire Under this tiny device. Let me actually do a little trick here. If you don't mind Jeff Fritz Can I just want to run my camera locally here? So this is my camera surprise. It's gonna be freaky Hey friends Okay, look at this. This is what the device looks like. What tiny that is like a stick of gum Okay smaller than the size of your finger little tiny thing very very light runs battery life could be Immeasured in days and weeks and not hours as it is absolutely fine. Okay, let's check this out Look at this friends. We did for you. I don't have this will actually work because of mirrored images Let's do this will cheat and you talk about the sides here and keep in mind This actually is a pro typing board. This is a beltman board And so this will be an open source open hardware project So you can of course make this into your own hardware projects and make this even smaller in that fun So this is the development board and yes to your point. It could be smaller. You could build this into anything Yes, and what's fun about this is that you can go and use whatever makes you happy for example We've got in my little kit here all kinds of stuff. We could potentially play with I've got a soil moisture sensor I've got LCD Screen like a segmented display I've got e ink you can see here where we wrote on e ink you could potentially do a tricolor e ink here That we got from Adafruit. There's potential there lots of different things that we could do But when I'm writing this code, you know, like let's see what it looks like. Is that cool? Yes, absolutely All right, so this is a part that I'm so excited about so I'm just gonna go into visual studio here and Let's do this. I've got two things to show you first Let's open up visual studio again, and I'm gonna go into my github and let's look at this e ink display If that's okay. Yes, absolutely And I paper I think we call that and one point here that we're course you're opening up visual studio 2019 Yeah, that's a good point I could open up visual studio code and edit as a text file because you should just see sharp But let's look at this. This is actually visual studio 2019 and I just added a physics, you know I added an extension to it to make this work with with meadow, but let's take a look at for example This e paper. I'm just gonna right click on this and I'm gonna say edit project file Okay, and look at that CS project here. Okay, we're targeting look the meadow SDK in this sense and this here it's pretending to be net 472, which is what mono supports But if we go and look at one of these displays Go look at these we've got these different libraries that use the meadow foundation and then let's go on look at the program itself Check this out. I'm gonna go ahead and make that bigger here Just make an instance of our new app and then basically chill out. So we look inside this I Love this. It's an app of Type f7 micro, which is that chip that we're using here on this particular device, right? Yeah, exactly. So this will match the the hardware the form factor So in the future other board will come out and you can swap in Because the meadow platform could work on other things and you'd have an app of that type as well Which is really really cool if we go in here and we say like initialize hardware. I understand that with micro controllers There's different buses. There's different ways to talk to things. What is an SPI bus? So that's the serial peripheral interface. That's a fairly well known. It's a standard communication protocol Generally, it's it's good for high-speed devices and you'll see it's used in a lot of these types of displays For example, because that's good for pushing a lot of data and this is interesting because you see right here There's this this right this this ribbon almost effectively made our own ribbon cable here Yes, yeah, exactly, right and it looks like we've got eight bits Going across that into a number of things you've got your ground your power and then a little bus here How big's the bus for these are three or six of these so the bus itself is actually two wires But there's there's a few extra things for various bits of control. So there's um Yeah, you're powering your ground over here power in the ground And you've got DO through DO 3 and then you've got SCX and then Mosey yeah, so there's there's a clock signal for SPI which is just to make sure that the two devices are talking at the same time And then Mosey is master out slave in which is sort of old-school technology We don't really say master slave anymore, but that's the standard for SPI The meadow in this case is the master and this screen is the it would be the slave Secondary, yeah And you see the MISO which would be if you had devices that were sensors or reading data in from the world I had to push that data back to the meadow board and then there's a reset pane a data command pan There's just some extra pins generally used in SPI I won't go into details right now But they're common to wire up and we use those when the GPO pins on meadow And what I'm finding really great about this platform, and I'm on Windows and you're on a Mac I'm gonna go out here because there's a tool that I wouldn't end up using to just plug this in I wrote a blog post about this so you can just flash this on Windows was really easy with this thing called DFU I did this one time just to install the operating system, and I haven't thought about this since this is not like it used To be hard to do this kind of work and you'd go and install generic USB drivers and all this kind of stuff But all I had to do was just plug the meadow in with USB showed up as a serial port Yes, yeah, that seems to be the nice clean generic way to do things it showed up as a serial port And I said oh it's on Comport 3 Yes, exactly, and then from within my application here in Visual Studio. Look, I can go and say right click Deploy and I got a nice clean experience. Yes, and you do have this on Visual Studio on the Mac as well Absolutely on the Mac and you mentioned the Comport one thing that's really nice about that of course is Windows Mac OS supports multiple comports Which can allow us to have multiple devices plugged in simultaneously and select which ones to deploy in the future Yep, and then the we have this concept of a driver and this isn't like a driver like a dot sys file or something on I've got a question. Well, you can feel free to just throw questions in and jump in quick question Your script 23 asks is the board powered only by the USB port. That's a great question. That is a great question So it depends on if you're developing or not. Yeah Yeah, exactly. So when we're developing will just plug in the micro USB cable and that will power the board Now of course if you are using peripherals that require more power, you know our displays are probably You'll see one this backlit And that's probably put the limit to how much power you want to pull through the meadow So you might want to have external power and then once you've got You know a hardened solution when you want to deploy in the field Meadow can be powered up battery as well And there's actually a battery port right on the and reminder again there This is in fact a and I'll go ahead and bring the camera up again This is a development board when we switch back over to here You can see come something interesting. You can see your micro USB here, and then I can power that off a lipo Yes, yes, I've done that or I have a little lithium-poly ion battery And that works really great as well and those can last for a very long time And again, this is the development board the other one will be a different size And to this point actually let's try something a little more sophisticated than eating because the ink is effectively hello world Yeah, I wanted to challenge us to do something more interesting perfect, but let's do that I'm gonna go back over here, and I'm gonna say recent projects, and I'm gonna go back over into my FM radio Okay, so check them out at this here This was a challenging we've been working on this this afternoon and and by we I mean you and I was also there But I get to to take lots of credit for it And I thought this was super fun because what Adrian went and did here is he made an FM radio Yes, and I wanted to explain this concept to folks that understand net because I thought it would be a Fun way to do it here. So what we've got? I'll go ahead and put my camera back on here Is we're gonna do this check this out. Okay friends. So we've got a Radio There we go. Thank you, sir We've got a radio here We've got the meadow board here. We've got some buttons over here There's the meadow and we happen to be powering it over USB, but doesn't have to be that way, but I want to be able to debug it and you know come to the stuff I want to do and Here you go. I can actually It's oh, it's upside down. Oh, it's I've got it upside down here. Watch. I'm gonna flip around the other side That's okay like this There you go. All right So what we're doing here is we're listening to the local public radio station here in Seattle or in Redmond where we happen to be okay, so what I'm gonna do friends is why don't you do me a favor? I want you to hold this And I'm gonna hold that there and what we've got is our speakers Yeah, let's put that in We're getting some I think we're in a building here. So yeah, oh, yeah, really you can't really hear it here Here This that cool. So what we've done here, I'll go ahead and unplug the speakers because that's that's fun Oops Oh, we should so how would we do a radio right? How would we do a radio friends? Let's look at this It's it's fun because I like it because it's model view controller Okay, think about this go nice. It's requesting radio stations. I guess so no now they're requesting radio station We're not taking requests here people. What's wrong with you? When I say model view controller, this is my construction not a meadow thing, but I thought about this and it's like well, there's the view Right. Absolutely. Here's the here's the model Here's the database to thing the web service the object the model the physical model and then in this context The dot net code is the controller Yeah, I love this in that great And then you've got your buttons there that will set it to mute or to scan forward to the next FM radio station Which is really really cool. This is the kind of cool stuff now again This is a prototype that we've made if we're going to go and sell our radio now We need to put an enclosure in a box. Yeah, exactly in two course you could go with it It's a great opportunity to start you know 3d printing to get your first first engineering sample going Mm-hmm, and then yeah, I don't quote me on all the parts But mostly sir are standard off the shelf. So it should be no problem to you know, make a custom board and Okay, so could this run dot net core 3 right so right now It's using mono, but in some theoretical future is dot net core and mono merge then I should be able to share a lot of that code Yeah, so um, maybe in the dot at five time frame. Yes. Yeah, I think you know that and I would but I believe there's some some there's some So the intent is to reconcile the dot nets Into a single dot net and mono right now is really let's talk about that for a second Mono makes sense for something like this because it's clean portable C code It's got a great easy to build code environment. Yes mono is portable mono can run on a Nintendo switch or a we right because it's so portable so the ability to be able to go and take mono and then take some of the ahead-of-time compilation things and Modify it in such a way that it works. It's just small device is important but in the future we're going to take dot net core dot net framework and mono and merge them into some kind of unified thing now those plans are years out two years out, but Certainly, I don't see any reason why they couldn't but I don't know if I can speak for For the folks at wilderness labs. Yeah, and I mean without overstating hit the goals to make sure this still it's The want is for to be a modern development experience. Yeah, so I think as dot net evolves You'll see the meadow platform evolve And you know is me mentioned start, you know supporting dot net standard Yeah, and that's a really nice way to share your code between dot net core dot net framework Well, and let's talk about that for a second because if we look at the code here Let's remind ourselves so the the individual said could it run dot net core three and the question is Does it matter because in this case if it is running to a standard if you have the functions that you're used to having Then it doesn't really matter your code is reusable exactly Yeah, but in the context of these kind of single-tasked applications. Let's call this a single-tasked radio application As soon as I do something that's specific to a piece of hardware If I'm on Windows and I decide to go and do talk to the registry Right. I'm using dot net core three, but I'm talking to the registry, right? So now you've got a desktop civic application. I just became Windows specific I can't do the registry on Ubuntu if I am doing a Raspberry Pi application and I talked to a GPIO pin Let's say that I hard-coded to GPIO 7 now It's not only Raspberry Pi specific, but it's specific to a wiring diagram the way I made it Then again with no matter what dot net it's been written in it's now Married to the system. So if we go back over here I like the way you did this. You've got your digital output for your LED your input for your mute button Let's look at initialized hardware. What's great about this is that at C sharp I know how to read it and you go and you say hey this pin is for output and this pin number 12 Which we've looking at our thing here. Yes, we've been that for 12 and then you go and get the bus ready And then you let us know Zero one two those are the pins that that device for the display is sitting on Set the contrast then we have an I2C bus another kind of bus another kind of bus exactly That's the one of the FM tuner is using Mm-hmm, and then we've got this Te a 5767 you can go and Google for that With Bing and learn about that particular FM radio which sits on that bus Yes, you see how you're chaining those together And then here we're just hard-coding it in that to start out with the local radio station And then we've got a search button the button is then hooked up and you'll see that there's a nice event there to go And say button change so it's very familiar Experience yeah, and one thing I love to call out here is typically for these kind of applications You're able to do all the hardware kind of the you know That was all the software wiring with the hardware plumbing in a single method with an initialized method Yeah, and that's really the only place you need to do that any hardware interaction Otherwise is just C sharpened on that so it's all just familiar coding in a familiar environment and look how easy it is So after you have initialized hardware Then we just have an update display and then update display gets updated as as soon as anything changes in this case And we're going to say for our text at zero zero I mean like I don't know IOT, but I know this that's what makes me happy Look the ternary operator in C sharp like this is C sharp that you already know which is super fun Yeah, and I think that's what's really means about Mono when it's running all these devices that yeah We're our skills are transplantable absolutely Look it sounds like some of our friends in the chat room are a little inspired and they want to know Will the source code be shared? I don't see why not actually we've got this source code right now Over here. I think it's hidden, but there's no reason we couldn't make this thing that we were messing around with public Is that okay with you? Oh, yeah, absolutely now. It's early days, but you can see right now This is an hour ago when we got all this stuff working you can see the FM radio code We were working on that as much as recently as an hour ago, and then the e-paper display I want to do point out to be clear that this is a beta. We're on beta 3. Yeah of meadow I think it's like what made it yeah meadow beta 3 yeah 3.1. I believe 3.1 beta 3 and it's so it's very early here Who knows what it will be done things will change your mileage may vary yada yada yada But go and explore Our friends at wilderness labs in their website and talk to them This was actually a successful kickstarter and they're kicking out these now You can go and watch a video about how this this project works and how it is going to force Hopefully move forward and do a lot of really cool stuff Yeah, absolutely lots still coming. So we still need add Wi-Fi support for some Bluetooth There's some performance improvements coming plus a lot more, you know driver surface. Yeah. Yeah If I go and look at my device manager right now, and I can see Right here. I can see ports and there's the serial of it This is actually kind of a fun thing or fun hack that folks do if you have a circuit Python device for me To fruit you plug it in it looks like a disk drive in this case It looks like a comport because it's kind of a universal bus that makes talking to these things really really easily and In fact, if I remember correctly, there's also a I mean, I'm on my desktop here. Let's go to desktop meadow There is a actually a CLI as well a command line interface. Maybe we can do a little something with that. Yeah, absolutely so the CLI is really it's the The proof of concept for all the communication to meadow and this is what's actually powering the the visual studio extension So if I go and say Can I see like file system lists will go like dash dash list files? Yes, exactly. See if that works. There you go So I just said list files that port com 3 opened getting a list of files. Oops, you can see there that it says Mono is currently enabled. So it's turned on right here If it was disabled, maybe might be formatting the file system or flashing a new firmware on top of it Well, so actually so interesting for the command line We'll toggle mono off and on so we can work with the device without automatically executing the application We mentioned right now you plug it in runs just runs right that idea that the single purpose so it automatically runs the It looks for actually app.exe mono fires up so you can disable mono Allow you to interrupt the file system without the app running. Mm-hmm. And then these are just the DLLs Yeah, that's exactly right on the mono, right? So let's think about the layers here, right? You get like system not object the meadow foundation You can see the drivers for your your FM radio on your screen, right the meadow Stuff that's underneath meadow that foundation and then the graphics library to output to The screen draw the text yeah decode bitmaps whatever it needs to go and not actually that's a good call Oh, and that's just code to me play data in memory. It's just buffering Which is a really great point actually if we go back over to that and take a look at the graphics library What's fun about these things is you can find out about The underneath like there's nothing hidden here. You're not hiding anything from us. You're like look that's a real font What's in there? It's the width of a height in 8 by 8, right? So this is actually we built a little tool. This is actually a it was a WCF application You designed the fonts by hand you just went and draw it in and it's saved into a I believe a byte array if I recall correctly and when you go and you do these things It's like, okay, you know pull it out of the font table. Yeah, this is it when there's nothing else Hiding from you there look there's all your fonts. Yeah, and that's very common in this kind of a tiny environment, right? Yeah, because of course, they're they're super small super efficient, right? So we go back to our camera here and take a look at what this font looks like I'm just gonna bring it around to the other side of the camera here All the cameras coming up is this hard-coded to a particular version of mono or can it be updated? So I will actually show you in just a moment here See there you go So there's the font that we're drawing on the screen right there. Maybe that's the 8 by 12 the 8 by 12 And right exactly so let's think about the versions and how how these things work for example I received my board when I got mine for my Kickstarter on version 3.0 of this operating system, so I plugged it in and you have to think about the layers, right? And correct me if I'm wrong here But it by default it boots up into mono with mono enable to look for api xe and it runs you turn it on and it runs But if I hit reset while it's plugged in it's gonna go into this device firmware updating mode And then I could go and run DFU util Flash the operating system on top of it. Yeah, all that's bundled and included with that. So when I downloaded it, this is mono here Yes, exactly and the stuff in it and that comes with the with the meadow So we are kind of dependent upon the folks that are working on this with their version of mono to make this work Yes, and so Yeah, I mean there are is there are there are some parts of mono that deployed with the Deploying with the OS itself itself and then actually that MS Core live, but we deployed as NuGet package Yeah separate pull down in terms of being up-to-date lays version of mono without miss. I don't want to overstate My understanding is intentions to keep it up-to-date. Yep. And so when changer made to mono those we pulled into the version model that gets deployed on meadow, so Pretty amazing stuff. I just wanted to share it with you all. I thought it was so cool Again, I'm not affiliated with this company, but they seem really cool wilderness labs.co They had a Kickstarter. I'm a supporter. I think it's great You can see I've got my kit that I got from them as well as the the wilderness labs piece of wood On which the breadboard is mounted So this is just an example of kind of the great stuff that happens with open source and dotnet and thank you for for hanging out with me Thank you so much for inviting me in so yeah, absolutely. Cool. Now what Jeff Fritz now We're gonna bring in our other hosts and we're gonna set up for our next Jeff deuces. See you all later. All right