 and 6.0. I'm very happy to have all of you here today because I think we've had a break for so long and finally we have managed to get something going and today is going to be the first time we're going to do it online and hopefully we can continue doing this because I think it's easier for everybody and it's easier to find a location also. So anyway let's just get started quickly. Yes, if you have not known about our Facebook group, please join. Our Facebook group is at just search for Hackware on Facebook. That's where we do most of the discussions. Otherwise, if you don't like Facebook, you can be on needup.com, then we will post our meetup there. It's needup.com slash Hackware. And so this is the theme, Chinmei, Myself, Qingxuan, Qingming, Luta, Sudarshan and Ambrose. If you guys are here, please shout out. And we are always looking for new organizers to come on board and help us continue the organizing the meetups. It's a free and easy thing, you know, at the end of the day. We just want to come together and talk about hardware and how we continue developing it. So please just ping me if you like to be one of the organizers. Anybody has any upcoming events which you would like to promote? Please just share it on the chat group, I guess, I guess. And also join our Discord server. I think it's still active, please. Yeah, you can discuss there. And I would like to thank today's session, which is sponsored by Engines or SG, they'll be recording this session, I believe. So you can, if you miss any part of the talk by Alex later, you can watch it on Engines.SG website. And let's move on to the meetup immediately. We only have one speaker today because unfortunately, Xiaoxiong can't be on board. So maybe he'll be presenting next, so we'll look out for that on our meetup groups. So I think Alex can introduce himself better. So he'll be talking about his DIY extra gaming controller today. Please, Alex, the floor is yours. Thank you very much. Great. Thank you. All right. So I'm not a stranger to hardware meetups. I've been presenting a few little things before. So this is the first time I'm doing this online. So this time, so to say, a necessity is the mother of invention. For me personally, the biggest problem I've encountered during these two plus months of staying at home is lack of physical activity. I quickly realized that I just, you know, becoming a vegetable, you cannot wait. And the energy is now there. The brain, it doesn't work as clearly and sharply as I would like it to be. And well, the solution to the problem obviously exercise, exercise and exercise. And if you were lucky to buy some kind of an exercise machine before the lockdown and before they got long run out of stock, you might think that your problem is solved. But then you quickly encounter the next one. When you have to do it every single day, very quickly find out that it is incredibly boring, really getting boring very quick. Right. So I was thinking about how can I encourage myself to do more exercise and not to come up with any excuses to keep it, et cetera, et cetera. And the answer again is pretty obvious to make it fun, make it some kind of a game. And actually for a long time I was thinking about how nice would it be to have, say, a flight simulator where you're playing flies only as fast as you are pedaling. And obviously if you stop, you fall. So it's a good incentive to continue exercising. Right. So I thought, okay, if I can somehow hook up to the exercise machine and get the speed reading and connect it with some kind of a joystick and find some fun game to play, it would be great. Right. All right. So before I started doing anything, I gave a little thought to design objectives. What I wanted to come up with is some kind of the design which can be reasonably easily reproduced by most of the makers in lockdown situation. At least if you have access to a straighter printer, you can order the parts from RS Online or the GKE and have access to basic tools, you can make the same thing. And obviously we don't want to use any exotic skills or parts or technologies. So deliberately low tech approach. So all exercise machines these days, they have some kind of a sensor and some kind of a device which shows you the progress. Right. The problem is that it is most of the time hidden inside the machine and there are not so many people willing to open it up and avoid the warranty, etc., etc., and it's more complicated as well. So I began thinking, okay, how can I take the measurements without opening up the whole thing? And obviously there are a few options about what kind of sensor we can attach on the outside. And the most trouble-free appears to be a magnetic sensor, that is, you take a small magnet like the one I'm holding in my hand right now. You attach it to the moving part of your machine and then you take a small sensor and take it to the stationary part of your machine. And this will give you one click per revolution. But another advantage of this approach is that this obviously can be adapted to pretty much any kind of exercise machine like a stepper or whatever. After all, you can put a magnet on your forehead and do push-ups if you want. So luckily magnetic sensors are cheap and there are so many different models, very easy to integrate. Problem solved, right? Now, okay, how to connect the sensor to a computer? And here, as many times before, I happened to be lucky because there was an Arduino micro in my drawer, which I got for some other project a few years ago, but never had a chance to use. And once I realized that it can present itself to the computer as a keyboard with the help from a little library can pretend to be a joystick as well. So design, as you can see on the picture, is very, very simple. Whoever can hook up a button to Arduino can repeat the same, but the problem. One symptom notice here is that Arduino itself is mounted on a panel. And the reason for that is that Arduino is roughly half of the cost of the whole thing. If later you decide you have a better purpose for it, you can just pull it out and use it for something else, right? So with probably 40 lines of code, the integration was done. So how it is detected by the computer is to access a six-button joystick with throttle control. Originally, I was thinking that maybe I should implement only the throttle control, but it proved to be not a good idea because many games, they do not really understand the joystick with throttle control only. So in the end, I had to implement a full joystick by myself. So I'll show you how it works in the demo later. So hardware actually was the easy part. What proved to be difficult, surprisingly, is finding the right game because it has to be fun. It has to be not very complicated. That is, I tried a few really thick slides in the laters and they didn't really work. First, because they were quite boring. And second, because they required control much finer than you can get with a handheld joystick. And after maybe a few days of trying a lot of different games, which was quite a fun process by itself. But anyway, I found one which made me happy. And here is the search stop. The game is Skyrog. Interesting thing is that for those who are interested in space technologies, you obviously know the guy named Scott Manley. So Scott Manley himself has a review for this game. There will be a link presentation if you want to see it. So it's quite fun. Obviously, you can use any other game you want, whatever it can work with a joystick or a gamepad. But this one works nicely. Now, the next step was mechanical design. The idea again was that it should be easy to make on a 3D printer. So it should not require any complicated parts to assemble. So for that reason, I decided against any screws or fancy connectors, because okay, where you get a screw or M2 screw or a specific size in a lockdown might be fairly difficult. So I just decided to glue the parts together. And notice here, there are three alignment pins. The reason for that is that when you are gluing parts together with instant glue, you don't really have much time to align the parts precisely. So if you use the pins, you can achieve very precise alignment very quickly. And the pins themselves, what it is, is actually a five millimeter long piece of the same filament I used for printing the casing. Some other design ideas were that it should be symmetric so that both right handers and left handers would be able to handle it equally well. And one important thing is that on an exercise machine, it's a good idea to have you at least one your hand on some kind of a handle, because safety is important. It would be no panic. No. While playing, again, you fall off your exercise bike and get injured, right? So it has to be operated with one hand only. So this was the second time consuming part of the process. So as you can see here, on the left, it was a minimal prototype with just barely covers all the parts. Obviously, it proved to be, it didn't work well. It's just way too small. You cannot grip it comfortably and control it. So after a number of iterations, I arrived to the shape shown on the right. So it now looks more like banana with a big red trigger button. So as you saw in the previous pictures, the whole casing consists basically of three parts, the upper half, the lower half, and the trigger, which is nice to be looking nice in the red color if you have multiple colors available. All right. So once all parts are in place, you can start playing the games. Obviously, this is not a perfect thing. It is good enough for me for now, but if I will ever plan to make more of this, there are a few changes I would make. So first of all, what I didn't think of first is emulating the standard gamepad buttons. So the different version has buttons in a straight line. So you have to remember which one is which. And also colorful caps, button caps would be handy. And second is the socket. I used to connect the sensor. It proved to be not very handy. So I would probably replace it with a 3.5 millimeters mini jack, which are also much more common and easier to handle if you didn't, especially if you didn't have any experience with crimping tools or if you didn't don't have the tools, easier just to solve the return a bit bigger, but it's not really a big problem. Because in the end, as a casing, it's probably 40% empty. So there's plenty of space inside. And the last part, how much is the phone basically? So for if you are to produce just one or a few copies of this, the cost of the whole thing is about 60 Singapore dollars and roughly half of these are in the micro itself. And the second most expensive component is the joystick, probably because the one I found is to use this from Sparkfun and Sparkfun things are not cheap, unfortunately. But if somebody would be interested to reduce this controller in like really big quantities, should be pretty easy to bring the cost down to maybe 20 dollars or something like this. First of all, we'll get rid of Arduino and just work with a bare micro controller. And last, but not least, is that if there is any interest for such controllers and if there are at least 10 people who want to get this thing for 60 dollars a piece, can think of making another batch of it. So if they're interested, let me know. So all right, that's for the theory. There is also a page with more details and all the links and names and parts. I will be sharing the presentation later in Hequia Group so you can get it from there. So no rocket science here really. Nothing unusual, it's just a matter of connecting the well-known components together. All right, any questions so far? How long does it take to 3D print the yellow one now that you have the federal version? It takes two or something hours. Not very long actually because it is mostly empty inside and I also designed it in such a way so that to minimize the supports inside. So there are actually very few supports. I tried to make the hollow inside volume you know angle at 45 degrees so most of it would be printed nicely without any support and the supports you still need are pretty easy to get rid of without much force or kind of sharp tools or anything. And then there's a cable there from it? Sorry? There's a cable that goes afterwards to something else? Yeah so cable, well you can use anything. There are two cables actually so one is the normal USB cable micro USB standard thing that's the socket mounted on the Arduino micro itself and another is for the sensor. So I just use the it has three contacts in it so I just used you know if you can see on the video the ones I commonly use on PCBs but it is not really very convenient because when you are exercising quite often you might wish to connect and disconnect it and it's not really designed for this so if you will be doing it often and not being very accurate eventually you will rip it off. So that's why if there will be a next version I will replace it with a normal mini jack. Actually there's plenty of space for mini jacks so I hopefully won't need to rework the casing much. And also an interesting thing which I'm very happy about is that the trigger button you just insert it in there and it doesn't have any access to rotate around basically the rolls on the PCB surface and the lower part of the casing it keeps it in place so but when you press it it travels as much as the button on the PCB basically less than one millimeter but it's very easy to assemble and the trigger it does not require any support to print at all. All right any more questions? I have a question how about the sensitivity of the joystick do you find any problems when you're playing the games and like leg or something? So for sensitivity obviously for all such sensors manufacturer recommendation is to install a bypass capacitor as close to the sensor as possible so if you can just scroll back and show you the picture. Yeah so here basically the big black thing in the biggest component on the PCB is the sensor itself and the other two components are the bypass capacitor and the external pull-up resistor. The reason I decided to add the pull-up resistor is that it is a fairly long and not very well shielded cable actually the original version had just a flat ribbon cable with no shielding at all so I had some concerns if the built-in pull-up resistor in Arduino will be sufficient I believe at 20k or something so I put in just 1k to be sure that when it is triggered it is triggered and I happen to have these mediances kind of like cube maybe less than 10 millimeters side this pretty strong I don't remember where I got that from but it allows the sensor to be triggered from more than two centimeters distance so obviously you want to maintain some healthy clearance between the moving part of your exercise machine and the sensor so two three centimeters it seems to work so I didn't have any false events from this trigger so far obviously before you find sport on your exercise machine and tape it to the sport you better test if it works reliably but I tried it with a few different exercise machines already no problems at all any plans to make it wireless like Bluetooth? I was actually thinking about this but well if you go for production of course you want it to be you know cool and wireless and everything but for something you're going to make at home during the lockdown times I thought it would be too complex and also wireless it means that it's going to have a battery and if you are thinking about sending it to somebody you know how much trouble it is to send something with a battery inside so I decided not to at this point but it would be nice yeah it would be nice but still you know not essential because when you are exercising you're pretty much tied to your exercise machine and your possible range of motion is not really so great so it will not give you much benefits it probably will make more sense if you add some manual throttle controller to this and make it like real joystick without an exercise machine then yeah it would make much more sense okay demo the whole thing or play the game sorry can you do a demonstration or play the game yes so if we are done with the questions I'm going to shut down the presentation and start the game because actually another reason why I chose this game is that it is stillized like an eight-bit graphics and it works nicely on a small laptop which I happen to have it happens so that my most powerful machines are on Linux and well there are not so many good games for this platform so I had to pick something either old or specifically designed for minimum requirements so okay I'm going to shut down the presentation and change to the demo part now all right so to start with can you see the controller properties here yes yeah so as I said joystick primary button is a red trigger of course then joystick happened to have another button inside of it so that button number two and four gamepad kind of buttons and you see is a throttle actually the interesting challenge was with the software so you are getting from the sensor one click per evolution now the challenge is how you convert it into some relatively smooth value which is still reasonably reactive that is you see now I'm at full now I stop pedaling and this pretty quickly goes down back to zero not instantly of course but I kind of found some function which worked in a reasonable way okay so now along the way I made a few discoveries learned a few things I didn't know I didn't know before that steam has a nice functionality which allows you to map the game controller you have to kind of standard joystick or gamepad and you can reassign the axis and the buttons as you wish so whatever you are comfortable with you can say that say button number four on the joystick is your green button on the gamepad and tweak it as you want and it hides all the all the details from the game itself all the game does not have to support any of these team takes care of it for you what is the functionality team what team it's a game service from where you download and launch the game and where you yeah okay now bear with me I'm trying to drag it to the screen just bear with me for a moment my laptop is not super fast okay so I understand all the functionality only works if you go to big picture mode you see this button in the top right corner well this is what we need once you click on it it behaves pretty much like a game console can you see the picture coming up not yet but we see it on your tv once the big picture mode is on you can control the rest from your joystick I think yes very your video is very likely well it is a bit struggling yeah to send the video and play the game at the same time I'm controlling the whole thing with my controller no keyboard right here's the camera angle a bit so since I finished the final design I played the game quite a lot and really once you start playing you won't even notice how you know you're pedaling for half an hour or more already just time flies much faster than you might think literally flying yeah Daniel laptop is really struggling to do too many things at the same time so this is my wonderful aircraft carrier flying in the sky so you can select your aircraft your weapons obviously you have to earn all the things before by flying successful mission now you press launch game which makes it fun to play is that the missiles replenish automatically so you will never run out of ammo all right so we're flying just a few shots again is that the landscape underneath is algorithmically generated every time so we never repeat basically and now look what happens if I stop pedaling so you can see on the left there's a speed indicator right so I stop pedaling it goes down and did red warning yeah I better start pedaling fast so I have to keep pedaling to stay airborne now while we're working sorry it didn't work well all right we're gonna be here for the next yeah it's very addictive you know once you start playing oh time flies have you tried playing with other games besides this I think this was it any more questions any back or anything have you tried with other games besides this sorry you're dropping out what was that have you tried playing with other games besides this I tried a few different flight simulators you know it doesn't work well with the serious ones it becomes you know reasonably simple and fun and you know colorful technically it can work with whatever works with the joystick with the throttle control so you can find any bike simulator or and of course if your windows laptop is more powerful this will be very beneficial because there are many great looking games which are fun to play but they will require much easier machine that so I tried a few you see there's third missions some wings something this and that but I don't like this one just remember that all this wonderful joystick and gamepad related functions work only in the big picture modes all right anything else from anybody great demo thank you it's really a lot of fun it was a great fun making it and it still is great fun playing it pretty much every single day Alex yeah is your code available uh yes the code is available uh I will be posting the presentation uh just after and uh there's a link but the code is just so trivial nothing to brag about really it's a good start for some of us well true so it's literally like maybe less than a hundred lines of code and well the circuitry is very simple as well so the only fancy part is the mechanical design the case and design so I learned quite a few new things about total desk fusion 360 along the way but it was a great experience I really enjoyed how it allows you to shape all this you know smooth organic forms nicely and never really worked with it before so it was great fun well okay then if there's no other questions then uh thank you very much Alex I think was a wonderful presentation and yeah I hope to see it continue being developed and maybe others can maybe Anand you can develop it for the smaller right it it don't need to be smaller it has to fit in your hand right so I had to make it larger aha yes yeah because otherwise you'll just drop it you will lose the grip in the most critical moment and you'll find it difficult to control and it was only getting bigger and bigger okay well okay um let me show you my slides so I believe someone had said uh do you want to make an uh ask a question please go ahead now or if anyone else has an announcement you would like to make yes hi I'm using a MacBook Pro and I have I'm using a virtual machine called Parallel and I'm also using uh this uh book cam uh yet I have one problem with uh one of the soft software that is in Microsoft that I need to input in a compot number which I cannot find so how anyone meet a similar problem and how do you overcome this anybody can help me hmm and you repeat okay there's there's one there's one software which I'm using uh trying to connect to a hardware and that requires me to input a compot number so right now I'm struggling to find out what how to get a compot number on the MacBook Pro on MacBook anoria well I assume it's a Linux so you should be able to to do some I have I've asked every I have asked everyone I have asked my lecturer asked asked uh a rep from uh Parallel and I checked website Facebook uh there's no answer so I think probably that might be no answer but it seems like there are some people who managed to do it but I couldn't get anything out from them uh is it um this compot is it serial port now we're talking about that uh yes correct is a serial port uh uh I don't know maybe you can just try opening up your Arduino that you can see what port it connects to uh that's the problem are you I know in Microsoft you have a device manager whereby you can open it up and you can see the compot straight away yes but in the chat someone mentioned to do the you know slash dev slash star and it should show you uh like some device instead of a compot I think the compot is really a windows thing no yeah come one come two whatever but the under under under the the mic it's more like a Linux so it becomes uh like you say LS and then TTI TTI is like a terminal yeah TTY yeah TTY yeah guys and um for for Mac if you go here here's the bus sorry sorry sorry we go into the terminal and type in the um yeah that's slash dev slash ggy style it shows you it lists all the devices sorry can you type that down because I don't quite I put it in the chat okay thanks thank you yeah LS lists lists all the devices okay great okay I see thank you so much what helps you if anything just post on the headwear group I'm sure there's a lot more people there and I just posted a presentation to say meeting discussion it is waiting for somebody to approve it to appear on on headwear is it uh yeah okay I'll prove it after the meeting uh on facebook we can see it already it's a pdf yeah okay great anything else anyone else need a job need government grants well okay if there's nothing else uh I want to thank uh I like for presenting and um engineer the sd for sponsoring the zoom mic mic thanks and all of you for being here tonight I'm sure you all have other things to do but yeah let's let's continue this maybe next next month yeah yeah thank you thank you any guys have anything to present please uh PM me or one of the other organizers uh yeah so stay safe stay healthy okay cheers bye thank you thank you bye see you guys thank you have a good night