 Okay, hello everyone. So I'm gonna be talking about how to control Electronical Vault and Robotics with the Node.js. I have some, I just made some experience with it. It's kind of like a, there is no way to do one, some magical library to everything in your life. Like it's always been like a complex. You have to do some of your own stuff in order to make some things work. So it's kind of different, but it's working nicely. So just briefly, basically I have to talk about Node.js and Electronics and Robotics next to do. So, you know, Node.js is just released very recent times ago, not that recent, but it is just a new guy. And it's doing only, you know, JavaScript engine and it's working nicely. So, about Node.js. I'm going to say, I think most of the people know it's using a Chrome 8 engine and doing some lightweight and efficient stuff. So it's also using NPM. NPM depends on the Node.js. If you want to use it, you have to use the NPM without it, it's not gonna work. If you wanna install, it's pretty much easy. One single command line, it's gonna work out. And one thing I like it, there's a documentation about every single release, every single changes. It's to make it easier to understand everything on the website too. So, it's really, really useful to use that part. And I like it. So, if you wanna use Node.js, there's also, the other ways you can install it, like you can use some version control, you can compile from your source, but in federal way, you can just install with DNF2 flexor. But, as a version, they are using the long-term version too, not the latest stable version. So, it's kinda like a not bleeding edge version. It's just like more like a long-term supporting version. Well, it's working fine, it looks like it. So, about the electronics. As I said before, electronics and robotics is kinda like always with, if you're building something at your own, it's always gonna be custom. So, if you just follow some sort of article about it, it's gonna be like a general way, but this is only work for that system machine or optimization, whatever you're building on it. In my previous job, I was working on industrial level protocols and also building an electronic card. So, that also give me some time to test kind of such things, which is good to be have some extra experience and an extra hardware under my hand and I can do some more testing and I like it. Well, there is several way you can connect your hardware with your system, with your Node.js, with your main machine, or you can, if you use some sort of an embedded card of machine, you can also connect the same way what you did. So, at first, I think probably most people if you're using Arduino or electronics, they know the SPI and IC2 and serial port is the first way you can connect with them with the Node.js and it's very easy. You just have to use, as NPM, you can use some serial port and it's just gonna connect it or you can just directly use from your system, there's a slash there part, there's a serial connection if you have the proper driver on your kernel, it'll work and it's gonna just give you the connection between your system and your embedded card inside of Node.js and it's working nicely. Well, about the speed, sometimes it's become struggling. I mean, like if you have some sort of multiple machines like a 20 or 25 machines on your system, it's become like a problem because that's so many machines wants to request and communicate with the Node.js and it's sometimes stuck at the connection. If you don't want to, I used, I has to use and I just suggest one of my friends also suggests me use an asynchronous part and it make it easier. And as a web server, and web server connection is also other way, which is nicely, but if you try to send something from your, even your cable connection under seconds, it's always drop the package and I don't know if it's gonna be reliable on that, but if you do something in real time, always use some sort of a cable connection other than web server because it's never do the way I want to do, but it's still good way. As an industrial way, I said, I was use Modbus and Backnet protocol, which is building automation system protocols. It's also usable on the Mod, in the Node.js. The basic, the basic is there's some sort of register list and register and write list and read list as in protocol. And if you wanna connect something in your industrial level system, you have to use that register list and you can connect it with your Node.js, which is the one of the basics. As a circuits and boards, as I said, you can use any kind of Arduino, your embedded cards and if you wanna communicate with them, you can use Node.js. As a microchip, it has to be used, some sort of a code inside of the microchip then you can use of it. And you can also use Node.js on openWRT devices, which is recently I found it out and I found how to compile it. It's the only problem is you have to use external hardware, sorry, external hard disk, then you can install because it's too big. As an ICU2 and SPI, it's also depend on the address list and it's also, you have to know which chip and which hardware you have inside of under your hand needs to know which connection needs to which where then you can communicate with them because if you don't know the address list, you can connect it. And the good part is about the SPI and also ICU2, you can use multiple connection in the same line. If you just like, you have a one single cable straight line from the one coming out from your motherboard or your embedded card, you can connect multiple machine, if just give the address number, you can connect them and you can control with them, which is a good stuff. We can also use as a multiplexer or something different like that. And if you know the each address, as I said, we can determine it and change it. I mean, as a determining is also when I try to say is because there's no general libraries for each single prevent vendors or manufacturers that does give you the same addresses or there's no kind of, as I said, magical library, what you do and connection. So you have to know the list and type it on and then you can connect it because sometimes if you just find some sort of a very rare chip and don't know what is in there, you're gonna probably need to know the data sheet. If you don't have data sheet, you can probably cannot even connect it because electronics is also depend on a documentation that they give you from the manufacturer. If you don't have that documentation, you can't do that, it just sucks. As an exemplary, I made some, in the end of the slide, I will show it. I made some my own robotics projects, the devices I tried to use, I used the IC2 chip, which is the chip is as an exemplary, there is an NPM for it. It's only works that chip, nothing else. It's, as I said, there's no general library. So that chip has 16 channel, 32 12 bit PVM driver. You can just control multiple 16 server motors or anything you want to use as a PVM signals. And if you know how does it work and need some soldering, definitely. And it's working very, very fast and rapidly. And the good thing is, you can actually multiply up to 999 devices with the single line, just bottom up to the multiple chip. If you solder it and it'll work 999 devices in the single line if you just connect it to your motor system and if you just type the code, it'll work. Which is the good part of the IC2. About IC2, about a little some basics. As you can see, just need to require the command you need and you can just call it out and make the address, make the frequency. And just when you get the code, all you have to do is, if you want to send the pulse, which channel you want to use and which length and which duty cycle as a PVM signal and electronics term and you can control it. Which is very, very easy I guess for that chip if you know how to control it. I mean, it's kind of sometimes you need to know what's the duty cycle and you have to calculate that. But when you have that, it's gonna be much easier after that. You just need to find that first then you're gonna be okay, most likely. Serial port is also another way which is I'm using that a lot for my own projects because it's too easy. I mean, if you wanna connect something with the USB device just serial port is the way what we do because we like the USBs and we now have to connect it. And the way is just need to install the driver and have the address which is in the Linux system in the federal, we have slash the under there and when we connect it, we can get the information we want so and we can use of it. As it right now, I have my devices connected to Bluetooth and it's using the serial connection and we just get the information I need and I can control it. So for this serial port, it's actually good thing is there's a command line too so you can actually check which port is available and accessible. So before the connecting that you will have to do some scanning before the coding start. So it's gonna give you some nice information before that as a quick start and it's actually good because you don't want to search every single time where is that, where is that. So it's nice to have that serial command line for the first time. If you wanna use it, it's very, very simple. We just need to know boundary and addresses in the computer or an embedded card and you can get the information and make sure you have a permission because sometimes it's asking for route permission and every single embedded card or you have to create some special group and you have to be in the group as a user then you can control it which is one of the basics. As a web server, as I said before you can still connect and talk multiple device on the internet if they have an internet or WIFI, whatever they have or it's gonna be even broadband. It's also gonna be used as a general web device or a website. Okay, internet is a good way to building some sort of a cloud application or organization application infrastructures. I mean, if you wanna build some your own smart house project, you can use that too, which is nice. But it's also, as I said, depend on which project we want to use it. And there's so many different ways to do that. You can use the libraries also already in the HTTP or you can use a different, like an express which is also very popular and very simple to HTTP as I understand because it's just more shorter than what we do. As an example, this is the HTTP way. We have to do the connection, port number and when you connect it, it's gonna give you a result and if you run it, you just point your finger there, you're gonna see this little head line and if you want to plug it, you're gonna see the console lock too. But as an express, it's that's all. It's just, that's all, you just need the library and it's gonna make shorter, but the difference is you're gonna have to select standard library, then you can end the connection and create the same idea as I did just before. It just, as I said, give you one. Same, you just need to find the port address and you can also specify the IP address or a post name or it's dependent on your connection system. It's so changeable. I mean, as I said, there is no general way to explain it as it's just not that. There is a millions way you can do that, which is nicely. Okay, so there is a couple of libraries using for connecting multiple electronical device is a general way, but it just work on that specific device and the way what we do is only support that way, which is some of them is like a cyclone and join a five, which is also other way to do that and a lot of it. Okay, as a cyclone way, if you want to use cyclone, you can install cyclone.js and there's tons of supporting, which is awesome. It's going to allow you to control a Bluetooth, BeagleBone, Raspberry Pi, keyboard, joystick, mouse. I don't know if you would like to have drone, you can use that too. And it's really, really neatly documented and it's updating too, and I like it. It's very nice. There is some little example I have, I can show you right now, which is not that problem. And if I can try it. Sorry, I have to start my services, seems to be. Okay, now it's working. Yep, should work. Okay, I'm going to check it after that, maybe I can try it later. I don't know why is it happening, I should work. Let me try one more time. I mean, this, this. Oh, maybe. Okay, now I have it. Yeah. Can I bring this thing right here? No, I have to just make some more screen. So, I have one device is allowing me to control if you are, I'm working basically with the robotics hands. So, if I want to control something with my hands. So, I need some sort of a special camera, plus an IR, some sort of a height. I need to know my height is. So, the basic idea is, if I can bring the screen. Yep, so if I just put my hand. Yeah, this is the point, if I wanna control it. And okay, sorry, I have to put that there. Yeah, it's nicely, I can even, all my bones and stuff is there, which is nice. What, see, needs, oh, I did it. Sorry. Okay, so, that's the main idea. I have to close it, because I'm, go back there. I have to exit from my presentation, sorry for that. So, okay. So, that's the one of the example, how I did it. And other ways, like industrial ways, let me try it. As I said, industrial ways is most likely, these two protocols is doing all the industrial building automations as I see, as I ever see. There's also one more protocol, but I never, ever see it as a Node.js. I never even tried it before, but these two is most likely do my, I'm basically all my jobs. In the others, I have to use the other language. So, no problem for that, but it is, it is. So, this is Modbus and Backnet is using, as I said, industrial. It's not new and I made some spell wrong, sorry for that. And it's really fast and really, really reliable. It's easy, but the problem is when you're starting in the first time about the industrial level connection, it's kind of hard to learn it, because you need some time to understand the address and stuff like that, which is kind of pain. Modbus is old, it's using for a long time. It's more like a basics device, like if you have a sensor or a counter or something like that, you can use of it. But as a Backnet protocol, all I see is I always need some extra space in my device because if you're using some sort of small chips, it's maybe gonna be insufficient as a space because it needs, so many protocols need to be supported. So, if you want to just use some limited support, you can probably use it, but if you want to support everything, so that's your way to need more space. And as in robotics, we have, as I said, awesome projects. As I saw, Cyclone, Jornify, and Gord. This story is, as a general usage, I used Cyclone and also some of my stuff I just traveled earlier, as a serial port. And this is kind of like, we can say the most general library I found it, but all of them is most likely focused on our review devices. But if you want to make your own devices supported, you can do that too, because the library is not that horrible or not that complex, you just need to know which port is which, then you can probably configure it for your own usage and you can use it very nicely. This tree, this tool is just based on how to use your devices as a library and control it. Gord is like a, just, you know, find device, install and just command directly. It's like a quick command line controlling, which is compatible with all of the disks in the top. And it's also other projects like Ruby-based and Go language. This is the Go language, this is the Ruby language, as far as I remember. So, I'm gonna have to show you one of my devices. I made it, it's not in here because if my airport doesn't allow me to do that, this is the devices I use it and I'm gonna show it just a second later, just a minute later. I said that, I think, because I think I messed up some simpler presentation mistakes, I'm sorry for that. So, it's also, as I said, based on, I think I just meant that too, because as I said, it's based on Arduino and Raspberry Pi. You can control so many devices like a different device, which is pre-made it and you can control it. You can make your own control algorithm simple, well-documented. And now I can show you what I did in my house in Turkey and how I control it. Most likely. Okay, let me try it. Yep, and it'll work. Okay, it's one of my testing times. So, when I completed, I was working fully. So, it's still the same sensitivity I had. I used Raspberry Pi and plus some IC2 protocol. Okay, this is my simple project, I made it. I used a different device and different way, which is working nicely. And I use the device in my hand, which is the, this is gonna be the white, just to call the difference. Okay, so, let me show it if I can. Okay, so as I see, I connected. My computer is there. Everything is gonna be not just, I have to calculate that. So, as you can see, all I did is, okay. The other two is disabled because, as I said, I was building, so the complete one is like this, but as I said, I didn't bring it. I'm sorry, this is the video I found most recent one. So, it was working. I did almost all the movements. So, the basic is you have to control all the finger, all the muscles. I have to calculate it, which is, it's a freaking six months. So, I talked with some of my mathematic teachers to do that too, because I need to learn some special algorithm. And it's take a huge line of code. It's almost complete. I'm gonna share it on the GitHub. So, everyone wants to do that same device I have. They can build it itself, or they can change it, use it. It's up to them. Other than that, I'm pretty much, I think, done. So, if you have any questions on stuff, I can get it. If not, I'm done with my presentation. Sure, let me tell it. There's a eight EMG control device, which is the electron mammography, which is get your muscle pulses. So, when you get the pulses, you get some, just on the numbers. So, the numbers depend on which part of your body in this particular part is moving. If you just release your hand completely, it's going to show you 25, 20 EMG signals per second, per millisecond. Because you are not doing anything then your blood line is, your blood is still moving. So, this is what you get it. But if you try to move something like this, this is gonna give you high result. And if you have more sensitive device, like more EMGs, so you can separate each fingers like this. So, in my case, I have six, sorry, eight. I have to separate them. The eight pieces to find each finger, which is the highest point, and calculate them with my maximum and minimum. I just, then I become to do the general usage for every single hand in this room or other in the world. So, when you do this, you will understand this is finger of the high up, and it's gonna be, if I remember, second and five EMG is depend on one of my first fingers and the other one depend on the other's fingers. So, this is how this work. So, the trick is, okay, when you move all of your finger, so let's say if I start all of them, so it's gonna, it's all of its higher, but still there's a little trick algorithm. It's just separate them and which one is moving or which one is not. So, it's kind of like a elimination and find the proper way to calculate them. So, there is a, as I said, I cannot just say this is the way, this is in the beginning of my talk. As I said, it's always gonna be some sort of an extra customization, such like this. Okay, anything else? Why didn't you choose to put, why not choose to use visual sensors? So, I'll set up three gear cameras, use those to figure out positions and then let's go. Camera is my first way. As I show it, this is the device to do that for me, but I want to do wirelessly, which is one of my project class. So, they asked me to do wirelessly and I understood it wirelessly. And it's the idea I come up and because I also want to test something else and as you said, I can do that too. I can do that the other way or other way or other way. There is no single way, yes, but I can do that too, no problem. Anything else? Which one works better? Okay, if you have some rock-solid configuration, this is okay, but the camera one, if you separate every skeleton's part, this is that better. It's more sensitive. And for this one, you need more EMG to separate them. And I know one of the university working really, really hard on that, they didn't come to the end of the conclusion yet. They spent almost $3 million more. So, it's not easy, but I don't have that resource they have. So, they are using more EMC, more sensitive device, and they try to do without camera. And it's gonna be actual working prototype, which is one of the human is doing his arm, the same idea I did. When I just almost finished this, I watched the video, they did that, and it's kinda sucks to see that before what I did, but I respect that. They have more resources, that's all I can say. But they're actually using one of the human to control his hands. He does, sorry, he doesn't have an arm, just put the, he just put the arm, the robotic arm to his place right here, and he's using one of them, two of them, on his right there, which is a little bit extra surgery and it's working. It's actually, he can, he actually even drive a car in a real road. So, I think it's pretty much a success, I can say. I mean, there are cases where people want to handle dangerous things or dangers. Oh, they're probably using special libraries and special countermeasures for that. So, it's not gonna be general libraries or something like that. But they- But in your experience, any bugs or things work pretty smooth? Okay, the only problem I encountered is, sorry, there are several problems I encountered. One of them is, and the first time is the timing. Because when I use IC2 or serial port, I have to find out which one's the fastest way because the problem is, for this project, you have to be a real time. Because, you know, when I started the moving, it has to start at the same time moving, which is right in the video. So, the point is I have to find some exactly timing problem. This is the first problem. Second is the algorithm between your arm and between your robotic arms. Find which movement is which. So, the last one is the Bluetooth. It has to be used Bluetooth 4 and lower level energy. And I have to understand between the protocols, what is in there. Thankfully, they share the source code. So, it's becoming easier. Other than us? Yeah, yeah, yeah. It's gonna be in my Github. Probably, I have to update it first so everyone can download and do what they want to do with that. You can use even like for normal desktop controlling, like a media control, you can do or other stuff, like a robotic store. It's all the way out working. Nicely. How do we find it? Hmm? Oh, sorry. Let me show it to you. Okay. Okay, let me open up in here. What if you just write down your Github username? Yep, yep, yep, yep, exactly, exactly. My Github.com slash my username. Okay, I'm gonna put up, I'm gonna put up. Okay. I'm gonna put up, just give me a sec. I have connected internet. Give me a sec. I think there's paper, that's what I was thinking about. Hmm? Traditional paper might be faster than that. Oh, yes. I just connected, so I got there. Sorry. Thank you. This is the link. I'm gonna upload it as a Flock 2016 and all the stuff I did is gonna be in there when I open up the actual repository. Become private about it. So, yep. I'm sorry for that. I didn't finish up the presentation in there. It was a typing there, so I forgot that. Sorry for that. Okay. Anything else? Okay, then thank you for coming. And thank you for listening.