Ben Stewart – Strange Parts https://www.strangeparts.com Adventures from the technological fringe Sun, 11 Apr 2021 16:50:42 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://www.strangeparts.com/wp-content/uploads/2017/03/cropped-logo512-32x32.png Ben Stewart – Strange Parts https://www.strangeparts.com 32 32 127242795 Connecting the chat controlled robot to Twitch Pt3 https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt3/ https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt3/#respond Sun, 11 Apr 2021 16:50:29 +0000 https://www.strangeparts.com/?p=890 00:00:00 Stream Starts
Happy friday!
What a week! We’ve all been very glued to the news.
Scotty hopes to finish up the twitch extension today.
Interacts with chat a little, weather is going more wintery again in NM.
Robogreg shares that FIRST Robotics kick off will happen tomorrow.
Scotty should be getting his second dose of the pfizer covid vaccine on the 12th!

00:06:01 Let’s look at this robot thing!
Scotty gets some stream stuff setup and recaps status of the robot to chat.
Scotty opens the robot todo list and runs chat through what he wants to do.
He needs to change the UI and make the buttons bigger. He would like to add authentication to check if the user controlling the robot is registered on twitch and using twitch, this to enable moderation. Finally, some kind of robot authentication.

00:10:18 Working on the buttons
“We need really freaking big buttons”
Scotty checks the Bootstrap documentation
but isn’t too happy with the default large settings so edits the CSS to make both the buttons as well as the text larger.

00:16:00 StackOverflow and Anecdotes
Responding to chat, Scotty shares that while everyone uses StackOVerflow for code, it was very difficult to do so in Google as so much of Google was secret, tailored to fit or completely custom from the get go.
He also shares that at the time, Googles internal search system wasn’t as good as the external.
Scotty continues by adding a title and the camera control buttons to the Overlay.

00:23:35 Do some client authentication
Checking the Twitch Extension documentation on verifying JWT (JSON Web Token)
“It’s much more fun to bash your head against the wall” Scotty says after dismissing the documentation, diving head first into writing some sample code.
Scotty find out the onAuthorized gets called and that the code he has enables the buttons once an authorisation token is passed.
Showing off some vim magic, Scotty makes a list of his buttons and uses jQuery.each for the disable/enable functionality.
enabling/disabling is a class of the buttons which is triggered by authorisation.
Scotty performs a quick test and notes the buttons are disabled but don’t get enabled.
It’s quickly found that removing an attribute won’t help as it’s a class that needs to be removed.
Scotty encounters a minor speed bump in that he doesn’t know the secret key nor the algorithm used.
Enlisting the help of @ConcreteEntree and @DJMarlus in chat, Scotty finds it’s base64 encoded and is passed a JS example that helps.
Scotty further has to remove the bearer from the header and decode the secret
The overlay now works!
Scotty checks off client authentication from the todo list.
He was hoping to get the extension up for chat to test but there are some infrastructural things he doesn’t want to show on stream so we’re going to have to wait.

01:03:20 Show&Tell Lever Nuts
Does chat remember Mango Liver Nuts?
Scotty now has them! he shows off the sizes and types of Wago Lever Nuts he’s had delivered and tells chat about the mango liver nuts story.
They’re highly recommended!
Scotty shows off the American Science & Surplus, one of his most favourite catalogues.
His workshop is outfitted with smaller hand tools that he can get from AS&S for relatively cheap.
Shows chat some clay sculpting tools and swaps
This is also where he got his TeaMug from!
Scotty also got some new LED Strips to use a shelf lights.
They flicker a bit due to refresh rates and PWM dimming but hiding and diffusing them will solve that in the future.
He’s already hooked them up to Alexa so he can control them from voice and they’re segmented into a group so controllable as a unit or individually.
Scotty winds down while talking a little with chat about lighting, Aputure lights and Sidus Link.
Scotty will have hosting setup for the next stream so he can deploy the extension and have chat test the overlay.

01:20:45 Wind Down
He ends the Stream by raiding LTT for the WAN Show
]]> https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt3/feed/ 0 890 Designing an enclosure for my microsocope switcher https://www.strangeparts.com/designing-an-enclosure-for-my-microsocope-switcher/ https://www.strangeparts.com/designing-an-enclosure-for-my-microsocope-switcher/#respond Sun, 11 Apr 2021 16:40:21 +0000 https://www.strangeparts.com/?p=884 00:00:00 Stream Starts
Hello everyone, happy Wednesday!
It’s been a few days since Scotty last streamed, he’s been busy.
He had his 2nd Vaccine shot yesterday!
Scotty has 4 or 5 different projects in the works but it’s taking a while and taking getting used to, not being in Shenzhen, not being able to meet with people because of covid, adjusting to parallel work.
With the help of @patrickod (Thank you!) a server has been spun up and some kinks have been worked out in the extension in Scotty’s local environment so he’d like to sort a lot of it out in this stream.

00:07:30 Robot Recap
Scotty recaps the status of the robot for chat;
He’s built the robot up using way too large mecanum wheels that were sent to Scotty by Esden
It has a camera and a speaker so chat can see and use TTS to speak with the robot.
It’s using Remo.tv currently for control but the idea is to give the robot it’s own Twitch channel.
Scotty apologies for being late to the schedule, he’s getting used to starting the stream and stuff that’s involved with that.
He gets the robot up and running in his local environment first.
Scotty explains Twitch use a process to vet and approve new extensions.
He’s currently in local test Scotty wants to get the extension in the Hosted Test status with a whitelist of usernames.
After this he can get it reviewed and hopefully approved by Twitch.

00:16:25 Working on Marionette
Scotty wants to start by getting his dev instance working against the cloud server.
The codebase, now named “Marionette”, is ready on Scotty’s cloud server, he needs to setup the local side to connect to the server.
He changes the frontend to point to the cloud and the robot to connect there too.
Robot keeps looping “Robot Online” – Scotty checks the log and believes @patrickod fixing HTTPS broke the previous code that negated HTTPS.
Scotty sees a lot of workers on the server side where he believes there should only be one.
This means the server is running old code and Scotty figures out NGINX is running app.py instead of quartapp.py
No twitch code for today!

00:26:00 What to do next?
With twitch code out the window for today, we need to rethink the stream topic!
What do folks want to do instead?
Scotty opens Airtable, a tool he uses to track lots of stuff to figure out ideas for this stream.
He can print a robot manipulator arm designed by @Ja_ames, or complete a dog treat dispenser sourced by @ferferite and already printed but it needs some attention.
Scotty has some iPhone parts and is briefly tempted to continue working on some USB-C stuff but shoots it down as he’d like to specifically prep for it.
oh_bother raids with a party of 99 so Scotty quickly recaps for the raiders.
Scotty eventually settles on designing a case for his Microscope Switcher.
Scotty recaps the story behind the microscope switcher and shows the stripboard that’s stuck down on top of the microscope.

00:39:40 Preparing to design
He needs to design a box with a lid and holes for a switch, potentiometer and an LED.
The camera switcher actually currently doesn’t have a switch yet so Scotty starts by looking through his switch stock.
BEcause of the height of the ESP and associated headers, there’s not much choice of switches that have the height necessary and the mount type that will work. Scotty finds a switch that will do.

00:51:02 3D Design in Fusion360
Scotty reminds Ambrose he can’t eat electronics while getting his calipers out to measure basic dimensions of the board.
Ambrose gets a little rowdy and derails Scotty’s plans a bit by demanding attention.
He checks the stripboard mounting holes so he can get holes drawn in fusion.
Using the basic dimensions and 2 holes in the fusion drawing and the constraints toolset, Scotty gets the basic premise for the board figured out.
Scotty then extrudes his sketch to make it a 3d base, from there he extrudes a rectangle within the plate to use as a facsimile for the ESP32.
Moving back to the sketch, Scotty then figures out where the LED and potentiometer are, draws them in Fusion360 as a sketch and extrudes them out as “posts”.
“It may not look like much” but what Scotty now has is a fairly accurate stand in or dummy 3d version of the camera switcher that he can use to design a box around.
Time to make a box!
Scotty creates an offset plane underneath the switcher stand-in, accounting for the height of the standoffs he intends to use.
This offset plane will function as the internal base for the box/case/enclosure.
He projects the outer lines of the switcher stand-in down onto the offset plane.
using the projection, Scotty gets walls estimated, gives the box a 4mm base and extrudes the walls out so they only barely let the LED stick out.
Scotty starts to organize the design a little by creating components with various parts. A process he says he should have started sooner but manages to complete without too much hassle anyway.
This does mean he has to redo some older work but as he’s figured it out previously, those steps are easily re-created into their own new component.
Scotty makes one of the standoffs so he has a good idea of where the board will sit in the case after which he extrudes the case walls again.
The next step is creating a sketch of the projection of the outer walls and extruding that up to cap off the box.

01:40:15 Break & Fetch
Ambrose and Scotty both need a break, this later turns into fetch.

01:50:06 Get back to drawing things
Luckily, Ambrose didn’t find any Forest Turkey.
Scotty projects a sketch of the potentiometer and LED circumferences onto the case lid and increases the diameter after which he punches holes through the lid.
Scotty now finds the potentiometer doesn’t stick out far enough so he decides to split the lid and drop part of the top down that doesn’t need to be so high.
He makes a step in the lid but loses the holes in the process and notices some other issues so hides some of the lid and board components for now and goes back to the board model to tweak some measurements.
He makes some minor adjustments to the “ESP32” in the 3d facsimile before unhiding the components and resuming work on the lid.
Scotty re-cuts the step down using a new sketch and then extrudes the lid back up and toward the potentiometer, intending to close the hole on the top and side of the step
Scotty again re-cuts the holes for the LED and potentiometer but is alerted by chat that he missed a small sliver of a hole on the side of the step. This is fixed.
A third hole is sketched and cut out so there is room for a switch.
After looking at some connectors Scotty has in stock, he decides to just punch a hole through the case to connect it to the photodiode.
Not pretty but it will work.
He sets to work making a rectangular hole in the top of the case above the ESP32.
With the lid and base modelled up, Scotty gets to work on the fixture method to fix the two parts together.
He quickly decides to use screw fixtures and proceeds to show chat some witchcraft.
Using the “Insert McMaster-Carr Component” tool in the insert menu, he finds the screw size he’d like and mocks it up in a corner of the case.
He mirrors the screw over to another corner of the case and then mirrors those 2 to the other side.
After using the Create Hole tool to make one hole for a screw, Scotty transitions to sketching them all out and creating the remaining 3 simultaneously with the same settings but this isn’t completely to his liking.
Scotty runs through the process again, finding a different sized screw that matches his wishes better and recreates the holes.
To finish the mountscrew prep, Scotty creates holes in the base of the lid that the screws will eventually cut threads in.
To top it off, Scotty punches holes in the base for the standoffs.
Now we have a box, it needs to look good so let’s put some fillets on things.
After fighting one misapplied fillet edge, it can finally be printed!

03:13:44 Let’s 3D print!
Scotty sends the parts one at a time to his slicer, Simplify3D, from Fusion360.
Scotty sets the print settings to a 40% fill with the lid upsidedown to minimize support. His slicer reports it’ll be a 6hr print.
Scotty shows chat OctoPrint showing how he can upload files from his PC.
He then decides he wants to switch filament and the stream breaks.

03:22:10 Changing filament
Scotty picks up a spool of PETG and figures out the material properties he needs to use in his Creality printer.
He switches to the now repositioned overhead cam to give chat a better view of the printer while talking about levelling and why he needs to do it a lot.
Finding the spool has instructions different from what he earlier found, Scotty creates a new PETG material in his slicer and sets it up, sending a print file to OctoPrint.
Scotty places the spool and loads the filament.

03:32:33 Let’s print a thing
The creality printer runs through a calibration process before printing.
Scotty gets pretty good prints with the creality so he doesn’t calibrate it all too often, only lately has he run into some bed adhesion issues so he is considering replacing the bed top layer.
Scotty monitors the first layer, he tries to change the layer height but because he used OctoPrint he can’t change it on the fly so eventually cancels the print and restarts it with slightly tuned settings from SDCard, making the first layer a touch lower/thinner.
Scotty gives Ambrose a treat and hydrates, interacting with chat.
Scotty monitors the printer’s first layer, tuning it as it goes. MEanwhile Ambrose is seeking lots of attention.

03:47:32 Winding down
Have a good night or day, thanks for tuning in everybody!
Scotty is going to try to hold himself to a schedule!
He ends the stream by raiding BaldEngineer
]]> https://www.strangeparts.com/designing-an-enclosure-for-my-microsocope-switcher/feed/ 0 884 Connecting the chat controlled robot to Twitch Pt2 https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt2/ https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt2/#respond Tue, 30 Mar 2021 07:30:38 +0000 https://www.strangeparts.com/?p=881 I figured out how to use Websockets and Cors to get Spare Parts to respond to clicking buttons on a Twitch overlay! There was still plenty of things to do but this felt like a huge achievement for Spare Parts’ channel.

This was streamed on Twitch on Jan 6, 2021.

Special thanks to Greg Needel of REV Robotics, @Esden for the robotics care packages and @tigga1986 for the pan&tilt camera bracket design!

00:00:00 Stream Starts
Hey everyone! Happy Tuesday!
Welcome to all the viewers, regular and new, what’s going on?
Scotty shows his new “mug”. a 1000ml graduated cylinder mug ( similar to https://www.amazon.com/dp/B07RT6H3R3/ref=cm_sw_em_r_mt_dp_bOy9FbEZ26YC1 ) as he broke his old one and the small 400ml wasn’t available, he now rocks

00:01:08 Show & Tell; Mail call
Scotty shows chat parts from china!
He has 3 bottom flex connectors for the iPhone 12 so the USB-C project can move ahead later.
Scotty looks at the to check if they’re originals or not.
They appear to be used. He isn’t clear on how used parts for such a new device are available but reports things move fast.
The old one is still MIA, Scotty is convinced it must have been thrown away.
Scotty shares he has heard that phones are being specifically sourced new and dismantled and torn apart for parts. He is certain this is is because the sum of the parts is currently cheaper than buying the parts or making them individually.
He’s fairly certain that glue traces on the cables give away that he’s not dealing with factory discards.
Scotty moves on and shows some glue he got for the project and factory discarded iPhoneX logic boards.
He then shows off his new 3D Screwdrivers using the microscope, these are purpose built with slightly different tips that are flat so provide a better mating surface to the screws
Scotty also teases a “secret project” that he’s not ready to discuss but will go to YouTube soon!

00:15:34 Explanation and Preparation of today’s stream
As Esden ( https://www.twitch.tv/esden ) raids with 34 Raiders, Scotty starts to explain the purpose of today’s stream and recap on status of the robot so far.
“Secret Project” is teased again, this time showing a nondescript brown cardboard box or “china packing”.
The robot comes online and Scotty connects to it.
Scotty kills the processes that run on the robot
He then resumes the processes except for mic and camera as he wants to run them separately.
the robot comes online on daspareparts ( https://www.twitch.tv/daspareparts )
Scotty runs chat through Quart, a Flask like python ASGI web microframework ( https://pypi.org/project/Quart/ )
Scotty then takes chat through how websockets work and what the Quart documentation suggests for using

00:35:46 Working on websockets!
So, what do we need to do?
Putting his explanation into practice, Scotty gets the newfangled Python 3 async io figured out and cleans up the iterative process he worked through on the day prior.
He switches how the robot has been running, substituting the remo control code for the twitch version.
He changes the server for the robot to connect to and comments out the authentication lines (for now)
After a quick json import , python controller is started and…

00:48:31 It works!
Scotty now goes back to the overlay view in Twitch Developer Rig
“in theory when I push this button the robot should move backwards”
Spoiler: It doesn’t.
The buttons call OPTIONS but not GET – now we get into “stupid cors stuff” ( https://pypi.org/project/Quart-CORS/ )
Scotty imports cors from quart_cors and performs more code hygiene.
We have a thing!

01:12:50 Laying out next steps
Scotty talks a little about latency worries and intentions on making the overlay bigger.
He’s been tuning ffmpeg to the point where the image quality is compressed to the point of pixelation.
This in the goal to lower the latency as much as possible.
There’s some idea’s exchanged about how to gain access or control to the robot using channel points, nothing set in stone yet!
Scotty outlines some next steps about deployment of the extension, client authentication and wanting to block random commands to stop web requests.
TTS must be re-enabled!
He eventually starts a todo list for; Make Buttons Bigger, client and robot authentication, cloud deployment and getting the extension on twitch.
There will be anti-spam.

01:24:23 Winding down
We got a thing working, thank you for joining us and Scotty is super excited about SpareParts having it’s own twitch stream!
]]> https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt2/feed/ 0 881 Connecting the chat controlled robot to Twitch Pt1 https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt1/ https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt1/#respond Mon, 29 Mar 2021 13:47:35 +0000 https://www.strangeparts.com/?p=876 Wow, you guys really stepped up and brought some AMAZING robot names to the table but what DID we end up naming it? I figured out, for the most part, how to make the robot do a thing and setup a new Twitch overlay. It was a little makeshift at the time but it was a start!

This was streamed on Twitch on Jan 3, 2021.

Special thanks to Greg Needel of REV Robotics, @Esden for the robotics care packages and @tigga1986 for the pan&tilt camera bracket design!

00:00:00 Stream Starts
Happy Sunday!
Scotty welcomes the regulars, the Robot says “Hi Twitch!”
Ambrose has just been out and is about to take a nap.
Scotty wants to get the Robot streaming on Twitch TODAY!
Scotty is a little worried as the latency on twitch is a bit high. Remo really flexing with their sub second latency.
Nightbot now has !commands which provides a list of commands.
The robot and Scotty welcome Nosh into chat and thank him for his mod work.

00:03:22 Idea explanation
The robot is going to stream to it’s own twitch channel over wifi.
Scotty wants to add an overlay on the twitch stream that has buttons that chat can press.
The buttons in this overlay on the stream will then control the robot.
Scotty wants to replicate the Remo.tv API to use twitch!
The robot (“Barking” in the background) is a little distracting so Scotty mayu have to turn it off soon.

00:07:35 Trying to prepare the robot for reconfiguration
Scotty shows chat the remo.tv view for people who haven’t seen it and then moves to limit some of the robot’s functions to aid in focus and building the twitch infrastructure.
After a little trouble with commands, almost being rickrolled by alexa, the robot and dog making off with Scotty’s lunch and a massive HypeTrain coming through, Scotty and Ambrose are a little too worked up to get back to the robot

00:23:54 Fetch with Ambrose
Taking @Ja_ames advice and channel point redemption, Scotty goes to play fetch with Ambrose outside, leaving the robot to it’s nefarious agenda

00:26:22 Robot preparation
Scotty comes back from playing fetch and VIPs @Ferferite, congrats!
Scotty successfully mutes the robot and starts to limit more robot functions
It doesn’t take long to limit the robot’s functionality to just tilting the camera – this has been done to keep the background quiet to help Scotty focus on programming.
Scotty explains the twitch overlay extension a bit, focussing on desktop and sets up a very, very brief demonstration.

00:46:47 Naming the Robot
The robot needs to have it’s own name because it needs it’s own channel and that needs a name, etc. etc.
Idea’s?
Scotty starts to write down name suggestions
After a back-and-forth on whether or not Scotty wants to executive decision this before someone stream snipes the name and registers a channel, Scotty Polls it anyway.
SpareParts wins!
Scotty claims https://www.twitch.tv/daspareparts
Scotty performs basic channel hygiene on SpareParts’ Twitch account and sets up the robot to stream to twitch.

01:14:17 Creating the extension and overlay
Scotty creates a project in Twitch Developer Rig to start the overlay extension.
Scotty has some template files from an example project, there is no front end and there IS a backend.
The backend will talk WebSockets between the user and the robot with some authentication eventually.
Scotty tries to setup basic buttons with JavaScript inside of an HTML markup file but the extension viewer doesn’t want to load it!
After loading the extension FrontEnd, the overlay becomes visible.
Scotty creates some simple buttons for left, right, forward, back, turn left and turn right.
With the help of chat, Scotty is reminded of Bootstrap when looking for the “Twitter CSS Layout system” ( https://getbootstrap.com/ )
Robot keeps rebooting, Scotty figures it’s probably the batteries so goes to replace them.
Scotty wants to make the buttons bigger but has to check the Bootstrap documentation to figure out what exactly is being used.
We learn that Logo and BASIC were the first coding languages Scotty ever learned, at school!
https://en.wikipedia.org/wiki/Logo_(programming_language)
https://en.wikipedia.org/wiki/BASIC
Scotty gets the buttons looking better with CSS, following the twitch extension documentation on guidelines and sometimes, just by adding some padding.

01:51:45 How to communicate with SpareParts?
After consulting the twitch documentation, Scotty starts to formulate an idea…. ~ish
“Closures; everyone’s favourite Javascript topic!”
While talking about games he’s been enjoying and what chat likes, Scotty codes away using jquery libraries in JavaScript to setup the functions of the buttons.
In testing, there’s something not quite right, Twitch isn’t seeing the request.
After going through his code, Scotty realizes he must have errors somewhere, his browser’s dev console confirms this.
Now he has a thread to investigate
@SkaveRat helps by reminding to set the CORS header in python ( https://flask-cors.readthedocs.io/en/latest/ )
Scotty is now able to send a request to SpareParts from Twitch but it doesn’t look like a call or command is made.
He rewrites some parts suggested by @SkaveRat and gets a “working” button (A request is sent which calls the right function) after which Scotty takes a quick break
When back from break, Scotty lets on he finds talking and programming at the same time to be difficult.
Some brief chitchat about keyboards, programming and debugging (like pair and rubber duck) ( https://en.wikipedia.org/wiki/Rubber_duck_debugging ) ( https://en.wikipedia.org/wiki/Pair_programming )
Scotty gets back on track; figuring out how to mix websockets and webcalls. He wants to send a message out a websocket when a webcall is made.
Scotty sets up the sockets end in python first.
Scotty gets raided by Roxkstar74, guided by Levelsio who were on an AMA together.
Scotty recaps the stream for the raiders and interacts with chat while another HypeTrain starts
He tries to get back to coding but Ambrose lets him know it’s dinner time.

02:53:52 Make the buttons do a thing!
Navigating around Ambrose’ food shenanigans, Scotty starts figuring out how the Websockets works
He manages to get data pulled out but it’s not entirely to Scotty’s liking as it onl;y seemed to work once and not on subsequent requests.
Scotty troubleshoots through his code with some help from chat and documentation, eventually concluding (though possibly not proving) that worker thread was locking the queue or maybe hogging cpu cycles.
This strengths Scotty’s vision that this should be pub/sub and not queue based as possible multiple websockets in future may suffer performance loss. ( https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern )
However – we now have communication between the client and the robot, so it works for now!

03:18:14 Logging Frustration on controller code
We have commands going from the frontend (client on twitch with the overlay) all the way to the robot so now we need to get the API working.
Scotty wants to repurpose the remo.tv controller code so Scotty needs to make the server act like remo.tv does when the robot connects to it.
gunicorn is modified to allow the server to listen on all interfaces. ( https://gunicorn.org/ )
In testing, Scotty discovers he needs more workers, which are added simply enough.
He then moves to enable access logging to get more information when sending requests so he has an accurate overview of what’s going on through the coding process.
This proves to be unexpectedly challenging with Gunicorn as open issues on Github and interaction with chat and consulting documentation proves.
Scotty starts to investigate flask sockets ( https://github.com/heroku-python/flask-sockets ) to identify the culprit here but decides there must be another way to achieve this.
Scotty promises chat that if anyone knows how to set this up he’ll be their best friend.
Eventually, Scotty turns to Wireshark to try to use it as an access log. Predictably, this works just fine.

03:52:48 Getting the controller code to authenticate
Scotty filters through the wireshark log results only to find the TCP stream is encrypted as it’s a secure websocket.
After a brief venture, @Jalopy_Jones reminds Scotty that this is the entire point of websockets.
This makes using wireshark as logging inefficient as it’ll only show the encrypted stream.
Scotty rewrites the socket code to print the message and finally gets something usable.
Now to grab the reply!
Authentication gives some issues until Scotty finds that chat channels are part of the Auth process.
“Doing some serious surgery”, Scotty removes a lot of remo code and sets Authenticated to TRUE
This still doesn’t give joy so he follows the authentication error to find what conditions need to be satisfied for authentication.
Scotty finds he needs to a ‘d’ data for the host and tries this by adding it to the json he sends through the websocket.
HE manages to force an unknown event type error with malformed data which is good but doesn’t point to any obvious leads for next steps.
Going through the code more, Scotty finds a commented global authentication, he uncomments it and the authentication works.

04:15:52 Making the robot move
Scotty adds buttons and commands to the sockets and tries to move the robot….. to no avail.
But, the robot does give an error, it expects a username in a user object.
Scotty adds these to the server but there’s still no bot movement.
Scotty figures out the ws.receive is blocking messages
He tries to get round it by removing used/closed sockets from the open sockets list
with some minor other tweaks, the robot now moves…. once.
After troubleshooting, writing some code that opens new sockets and going through everything, Scotty figures the open sockets are in other workers.
Time to take a break!

04:53:24 Winding Down
Scotty needs to research how to use websockets.
Thank you all for watching!
Scotty ends stream by Raiding Ryan56k ( https://www.twitch.tv/ryan56k )
]]> https://www.strangeparts.com/connecting-the-chat-controlled-robot-to-twitch-pt1/feed/ 0 876 Building a Japanese mechanical split keyboard Pt.5 https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-5/ https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-5/#respond Mon, 29 Mar 2021 13:37:32 +0000 https://www.strangeparts.com/?p=872 OK, this should be the one where I fix this thing, right? So we have a couple of keys that don’t work and a bit of an LED Party Mode going on. Come find out what’s wrong and watch as we get this Corne Chocolate split keyboard finally working!

This was streamed on Twitch on Dec 30, 2020.

Special thanks to Jesse Vincent of Keyboardio for loaning the Corne Chocolate and sending the Keyboardio Atreus!

00:00:00 Stream Starts
Hello Everyone! Happy Wednesday!
Scotty welcomes regulars and newcomers alike. Interacts with chat and lets people get in the stream before he starts on the KEyboard.
Something with the LEDs is freaking out, we’ll see in a minute.
Scotty has been shooting a shop tour video for YT!
Baldengineer raids with a party of 29 ( https://www.twitch.tv/baldengineer )
Scotty recaps the keyboard project.

00:02:05 Keyboard status
Switching to the top down camera, Scotty shows us what’s up.
There are 2 keys in the same position on both boards that don’t work.
Initially it looked like there were 4 keys however Scotty has found out 2 of the 4 are not configured / unbound so these are actually fine, just the testing software didn’t pick them up.
Connecting the keyboards to USB, LED Partymode is enabled on the left board. Scotty believes a LED on of the first keys has a soldering issue as it looks like data is getting corrupted.

00:03:08 Let’s take this apart!
To the dismay of chat, Scotty announces “Party mode is not intended” the LEDs should be solid colours, not flashy and weird.
Scotty installed VIA ( https://caniusevia.com/ ) and it was during this control that partymode started.
Scotty takes the screws out of the backplate stand offs and then figures he may have to take out the key switches.
Explaining his thought process, Scotty decides he may not have to as all the soldering is on the back side the PCB anyway and is accessible.

00:05:11 Troubleshooting PartyMode
Scotty opens the documentation ( https://github.com/foostan/crkbd/blob/master/corne-chocolate/doc/buildguide_en.md ) to figure out what the first LED in the chain is.
He wants to check the diode directionality and LED solders.
catching up with chat, Scotty confirms 2 of the 4 LEDs that appeared unresponsive DO work, they’re just not assigned to anything.
Scotty confirms the diodes he placed are in the right direction.
Nightbot has new commands! We have !robot !project !microscope and !switcher
He checks if all diodes should have the same direction, this is confirmed to be true.
Scotty presumes that LED1 is a problem on the left board and right as he touches it, the LEDs fix themselves.
By touching it again, the partymode is enabled again.
Scotty reckons he just needs to reheat a solder joint.

00:10:47 Fixing PartyMode
Scotty prepares the soldering iron, microscope and switcher.
After quickly reheating the joints on LED1, the LEDs appear to work as intended.
Touching the LED doesn’t make the LEDs freak out any more.
The microscope and soldering iron a put away.

00:14:14 Troubleshooting the mystery not working key
Scotty starts VIA and shares his screen.
VIA shows the problem key in question as if it’s in a fully “depressed” state.
Scotty removes the keyswitch from the board and tests the socket with tweezers, shorting the socket out to check for a keypress in VIA.
Nothing notable really happens when using tweezers although admittedly, Scotty doesn’t know if his tweezers are conductive.
He gets his multimeter to check voltage drop.
Scotty works out he does see a difference in voltage across all switches (2V) vs the broken one (0.7V)
He checks the other board as it’s the same switch which is weird. It should not be a symmetrical bug.
If it IS a symmetrical bug, Scotty is buying a lottery ticket.
He removes the backplate from the right board and the switch that has issues.
Checking voltage, he sees 1.2V on the right board and 0.4V on the broken one.
Scotty is convinced it’s not the switches but tests them anyway – they work just fine as expected.
Chat and Scotty now suspect a firmware bug.
Seeing there’s a kicad file ( https://kicad.org/ ) for the keyboard PCB available and downloads kicad in the background.
He returns to checking the diodes. There are some test pads on the board but these aren’t super helpful for this particular problem.
Visual inspection of the board doesn’t reveal any obvious hints as to which diode goes where.
Scotty has some suspicions but would like to see the PCB diagram.
Once kicad installs, Scotty inspects the PCB diagram.
Scotty identifies Switch17 in Row2, Column 4 as the culprit but has no real lead on the cause.
Chat says diodes are to prevent ghosting through back-powering.
Scotty decides to pull the diode for switch 17 to check if that does anything.
Scotty prepares to pull the diode for switch 17.
Alternating melting solder on each diode leg, Scotty rotates the diode off the board and visually confirms correct directionality again.
With the diode removed, the symptom does not change.
Scotty quickly checks if his tweezers conduct before checking if shorting other key switch contacts does anything.
That works as expected but doesn’t give any more meaningful information.
Scotty changes his multimeter probes to grabbers and connects to the pins on the pro micro to check continuity and immediately gets a hit.
This sort of confirms the fully depressed state so it looks like a short, but testing other switches doesn’t get any meaningful info.
He connects the multimeter to the pins for switch 1 and checks activity there, notices he has to set the multimeter to diode mode and confirms correct functionality.
So, with new helpful information, he reconnects to the pro micro pins for the broken key and now has a proper confirmation there is a short.
Scotty removes the OLED to try to remove the MCU but realizes it’s soldered on.
He breaks out the microscope again to inspect the solders.
Immediately spots the mistake; one of the pin solders is shorting with row 2.
@DumDuck caught this earlier, thank you DumDuck!

00:58:06 Fixing the mystery not working key
A visual inspection confirms a very similar short has been made on the other board.
Scotty gets out the soldering iron and flux to clean up the pin solders that are causing the shorts.
reheating the pins mostly fixes the issue but some solder wick is used on one for good measure.
Scotty has a minor false start in thinking the fix is done and wanting to test but is reminded by chat to put the diode back he removed earlier.

01:07:01 Keyboard Re-assembly
without putting the keyboard completely back together, Scotty quickly checks the VIA Keymap test by shorting the socket with his tweezers.
Test success!
Scotty puts the key switches back in place and tests both boards, All looks ok.
Scotty screws the backing plates back on while chatting with chat about loosing and looking for small components like screws and the importance of spares.
Putting the OLED Cover on, chat moves to /me chat
Scotty gets out the keycaps!
It’s going to be a surprise how it all fits together because several caps certainly won’t fit and others seem too big.
Once Scotty completes the letters he’s left with ill-fitting keys for a “normal” keyboard that don’t really fit the chocolate.
He starts using random keys but as he completes the right board, the left board goes into partymode again.
He sticks on 3 entirely random keycaps, unplugs the board and sets up to fix the LEDs, again.
Scotty removes the LED that’s giving issues and pre-emptively replaces another one while chat talks about Alexa wake words
Once the LEDs are replaced, the keyboard looks like it’s fully functional!

01:44:18 Keyboard testing
The keyboard works!
Scotty sticks rubber feet onto the right backplate, puts the left backplate back onto the board and attaches the feet to it.
The Pro Micro MCU pins on the left board interfere with the board laying flat on the desk so for one last time, Scotty removes the backplate and cuts down the pins.
During this, he talks chat through the Gas mask project and how YT content creation can sometimes be misaligned with world events and thus affects the project as a whole.
Noticing cutting the pins worked, he does the same on the right board.
Once the boards are put together and powered on again, Scotty runs through the VIA keyboard tester.
He swaps round 2 keys to give better LED passthrough and tries typing with the chocolate in vim.
Scotty goes through the VIA modes and layers a little bit.

01:58:35 Winding down
Scotty catches up on chat
Apparently requests queue isn’t showing up for Scotty and he’s been having more trouble with it lately.
While he fulfils a hydrate he starts to wind down as it’s nearing curfew.
Scotty has been playing around with making keycaps and is interested in maybe designing his own keyboard.
Chat concurs that this would be great.
Tired and hungry as he is, Scotty wraps up the stream.
]]> https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-5/feed/ 0 872 Building a Japanese mechanical split keyboard Pt.4 https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-4/ https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-4/#respond Tue, 23 Mar 2021 13:00:00 +0000 https://www.strangeparts.com/?p=861 We’re SO close! I think there’s a configuration issue because the same key on both boards doesn’t work. I soldered all of the key sockets to the boards and then built them up almost to completion!

This was streamed on Twitch on Dec 29, 2020.

Special thanks to Jesse Vincent of Keyboardio for loaning the Corne Chocolate and sending the Keyboardio Atreus!

00:00:00 Stream Starts
Hello everyone! Happy Tuesday, how’s everyone doing?
Scotty talks with chat a bit and sips his tea, giving people time to get into the stream.
Responding to PC optimization tips in chat, Scotty reminisces on autoexec.bat optimisation of floppy’s.
Scotty hopes to finish the Corne Chocolate keyboard in this stream.

00:03:01 Keyboard project catchup and preparation
“Not enough hours in the day to fix all the things that need to be fixed”
Scotty goes through the next steps, putting the Keyswitches away from now and giving chat a quick overview on where we are in the process.
Scotty has to mount the keyswitch sockets next. It’s something he’s never done before so it’ll be a learning experience.
Scotty checks the build guide to acquaint himself with the next step and does a dry test fit to figure it out.
Scotty lets chat decide whether or not to use the microscope, he feels microscope isn’t really needed and sets up to do a couple without and see how it goes.
Chat recommends flipping it the other way around; scope the first couple and go wide once more sockets have been completed.
Scotty obliges and sets up the microscope.

00:12:20 Soldering Key Sockets to the left board
After some minor, potentially fire starting, mishaps and chat interaction, Scotty starts soldering the key sockets.
He notices the soldering iron needs to be a little hotter than it’s current 280C setting and bumps up to 330C.
After completing one socket to figure out the process, he’s happy to move forward and tins all the pads first.
Scotty comments that the 60/40 solder appears to be better than what he was previously using.
With all pads tinned, Scotty moves to solder the sockets in place.
Joining in on workspace stories in chat, Scotty shares an anecdote on soldering in his apartment in China.
Apparently jackhammers are the most frustrating to have to deal with as the reverberations go up the building.
While replacing all water lines in the neighbourhood, big backhoe mounted jackhammers were used and for another project replacing tiles inside the building they have drill mounted jackhammers.
12hr/day jackhammer sessions make filming very hard!
The conversation moves to infrastructure in Shenzhen and why so much building works go on.
Then Scotty comes up with an anecdote about train rails about how they’re built to a higher train speed spec than is currently used because the Govt. in China is maintaining an affordable infrastructure level for the population during it’s economic growth.
Scotty gives chat a good zoomed view of the sockets he’s soldering and the key switch that goes in the socket.
The sockets are placed in appropriate holes in the PCB and Scotty pushes down on the socket tabs with the iron, melting the earlier tinned pads and soldering the sockets in place.
Answering chat questions, Scotty goes into where he orders components (lots of places!)
And shows chat the acrylic backing plate and PCB covers that will go on the keyboard.
There was some snowfall in Scotty’s area so he drove around appreciating the environment.
Scotty shows chat he’s being experimenting with UV cured resin to make custom keycaps!

00:43:26 Soldering Key Sockets to the right board
Scotty has completed the key sockets on the right board.
After he changes his camera setup a little bit and adjusts his chair, he starts tinning the socket pads on the Left board.
This was done super quickly and Scotty quickly moves on to soldering the sockets.
Scotty talks with chat about PCB designs, reflowing and his microscope.
Twitch controlled vacuum is joked about again.
Scotty talks about making a robot that can go outside but he would have to talk with the governor of the pueblo he is staying at as there are some religious sites and sensitive areas as well as potential nature hazards (for robots) that need to be taken into account.

01:01:12 Building up the Left board
There will be a second channel!
Soldering is now complete according to the guide.
It’s time to install plates and switches.
Scotty tells chat about where he picked up his skills and experience while preparing the black acrylic backing plates.
He gathers small parts in a dish and reads up the guide before starting to screw stand-offs to the backing plate of the left board.
Leaning into a conversation about chat, Scotty says to consider getting a TS80P soldering iron over the TS-100
Talk about shipping from China.
Scotty gives the inside of the backplate a clean with isopropyl before putting the PCB on and then screws the PCB cover in place.
it seems the PCB cover is making switch installation difficult so Scotty removes the cover.
Following a chat recommendation, he installs switches in each corner of the PCB cover while talking about re-applying for Twitch Partner.
This seems to have been the ticket as installing the cover now seems better.
Scotty installs rest of the switches while a discussion on partner/affiliate multi-stream goes on in the background.
Once all switches have been installed, Scotty screws in the PCB cover while letting on his experience of YouTube Premiere.

01:37:41 Building up the Right board
Continuing the YouTube Premiere train of thought, Scotty has actually completed key switch and PCB Cover installation of the left board.
He’s not completely done with the left board just yet but starts on building up the backplate, PCB, PCB cover and key switches on the right board.
Scotty is enjoying building Twitch organically as opposed to his YouTube which went viral and the implications and learning curve that brought with it.
The switch in every corner trick is used again and Scotty is quickly installing the rest of the switches into the board.

01:54:21 OLED Cover installation
Scotty notices he forgot the stand-offs for the OLED covers.
He now has to remove the backplates to install the stand-offs.
Left board OLED cover is installed first and it’s associated backplate then re-installed.
Scotty discovers that he requires an additional 2 screws. Presumably the screws he dropped on stream earlier.
Luckily, he has spares on hand!
Chat starts talking about a project called Solarboi
The project is a remote controlled robot in Australia that can be controlled from hundreds of km’s away.
Scotty loves the idea of a long range robot but he’s not sure he’d trust it.
He finds a screw he lost!
Discussion moves between solarboi and Starlink while Scotty puts the right board back together.
Scotty tests the boards before putting the keycaps on
Scotty asks what test method is best as there was something “the cool kids” use. Chat leads him to QMK Configurator
The ‘V’ key and another key on the left board are unresponsive.
The ‘M’ key and another key the right board also doesn’t work.
These happen to be the same location keys on the right board as the left so Scotty now suspects it might be a configuration issue.

02:17:38 Wrap up
Scotty has to wrap up the stream because of curfew.
He removes the PCB Cover so he can short out the switch but this doesn’t really help.
Scotty turns to GitGub to check if anyone else had a similar problem.
Scotty downloads via to check the keyboard’s keymap.
Scotty has to wrap up before being able to check the keymap.
Thanks for tuning in, Scotty is excited to complete this project tomorrow.
Stay safe and Stay sane!
]]> https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-4/feed/ 0 861 Building a Japanese mechanical split keyboard Pt.3 https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-3/ https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-3/#respond Mon, 22 Mar 2021 13:00:00 +0000 https://www.strangeparts.com/?p=858 It seems like this keyboard has a million little LEDs! No matter, in this chill stream I got them all soldered on and after replacing a LED or two, all of them seem to light up!

This was streamed on Twitch on Dec 28, 2020.

Special thanks to Jesse Vincent of Keyboardio for loaning the Corne Chocolate and sending the Keyboardio Atreus!

00:00:00 Stream Starts
Hello hello, happy monday everyone!
Scotty interacts with chat a little, welcoming people into the stream
We’ve been so focussed on the robot lately that we haven’t been building the keyboard.
Scotty is so excited he’s hitting the table, something he’s been told not to do, specifically during podcasts.
He intended to stream and do some recording today but after falling down a rabbit hole he lost a lot of time so he only has a little while.
Robot will stay switched off today.
He DID get some parts for the robot which he wants to show off.
Expect the robot to be turned on tomorrow!

00:03:14 Show&Tell Robot parts
Scotty shows us some parts he received in the mail for the robot.
A small Bluetooth speaker to replace the temporary setup.
A small USB microphone to replace the recorder he was temporarily using.
He’ll probably add the parts off-stream.
Scotty again jokes about making a chat controlled robot vacuum as the first robot is well received.
Scotty alludes to giving the robot it’s own Twitch channel and controlling it directly from Twitch rather than remo.tv
If anyone knows how to program overlays to do this, contact Scotty in Discord!
He’s specific in not having text commands, he’d like an overlay extension.
chat tips Scotty to check out Twitch Control

00:07:27 Keyboardio Atreus
Robolathe segways Scotty off of Robot talk into keyboards by asking about the Keyboardio Artreus in chat.
Scotty has an Artreus on his desk.
Chat, still obsessed with the robot, is circling back to the robot and twitch chat bots, Scotty clarifies saying overlay extension, not chatbot.
Scotty goes through some channel point rewards he is unable to fulfil as the robot is offline and Ambrose is not in the shop.
Forest Chicken has been sighted so no Ambrose. 🙁

00:11:37 Let’s do some keyboard stuff!
Scotty has completed LED soldering on one half of the keyboard he’s working on, follow with the build guide here
Setting up his workspace to solder some more LEDs, Scotty explains he’s changing his desk setup.
He’s moved some stuff away but has an idea to modify his laptop strand to be height adjustable.
And, Scotty has 60/40 solder and rosen flux that hopefully won’t be so toxic!
Scotty then sets up the microscope and top down view to give chat a good look at the soldering.
Once setup, Scotty grabs his tweezers (Rhino SW-11 Tweezers) and the LED strip and talks chat through next steps (check build guide!)
Some minor stream shenanigans happen with the microscope camera switcher

00:19:12 Soldering LEDs
Still minor camera issues but nothing too bad, the switcher needs a recalibration.
The new solder looks better and Scotty makes quick work of soldering the first couple of LEDs before turning down soldering iron heat. (280C)
Scotty holds a dialogue with chat about pronouns and how to handle them.
they/them is deemed acceptable.
While Scotty continues to solder LEDs, the talk morphs towards being PC and why.
He turns down the soldering iron a little more as the solder seems to flow better.
Checking his work intermittently, LEDs look ok in steps.
The discussion moves to diversity and how when applied correctly it can be very beneficial, this then moves into interviewing techniques and whiteboard interviews.
LEDs still test ok on intermittent checking.
interviewing discussion takes another turn and moves on to experience and how to show it, either through Github or LinkedIn or how to approach not being able to speak about your past experience (Due to NDAs or anything else)
This goes to recruiters.
On the final test, Scotty notices the last 2 LEDs aren’t working!
He checks the solder but seems that’s not the problem. Instead he replaces one LED that appears to work but may have fried the signal out line.

00:55:40 Winding down, Raiding Barnacules
Scotty starts tidies his workspace he explains he’d like to shoot some videos and wants to stream, he hopes to combine the two tomorrow.
He checks in with Barnacules and raids them.
]]> https://www.strangeparts.com/building-a-japanese-mechanical-split-keyboard-pt-3/feed/ 0 858 Building a robot YOU can drive around MY shop Pt.6 https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-6/ https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-6/#respond Sun, 21 Mar 2021 13:00:00 +0000 https://www.strangeparts.com/?p=848 You can now tilt the camera and use text-to-speech on the robot but streaming the robot’s view is a little hit and miss for now. And chat is figuring out how to use my Alexa speaker via the robot. Join me in this Christmas Eve adventure where a lot of the Robot’s core functionality was completed!

This was streamed on Twitch on Dec 24, 2020.

Special thanks to Greg Needel of REV Robotics, @Esden for the robotics care packages and @tigga1986 for the pan&tilt camera bracket design!

00:00:00 Stream Starts
Stream starts. Merry Christmas all!
Scotty interacts with chat, going over christmas plans.
Chat share the robot link to try driving
Talk about adding a tilt and pan bracket that @tigga1986 designed to the robot to improve camera experience and then move on to working on the Corne Chocolate on stream.

00:06:59 Picam to OBS
Scotty researches how to send the Pi HQ Cam feed to OBS so he can stream it on Twitch.
The thinking is to create a secondary twitch channel for the robot as a BTS channel that chat can control but it would also allow Scotty to share the video feed in his streams.
Scotty installs vlc packages on the robot’s raspberry and then troubleshoots himself through connecting to the camera over network.

00:32:22 Camera connection troubleshooting
Now he has a feed, Scotty troubleshoots why the connection kills itself.
He starts by looking at the remo.tv ffmpeg settings as that’s a different to what the vlc package was using, however, it appears the camera is now locked out of remo.tv’s config because it’s being used by vlc.
Scotty reminds himself on local RTMP server for streaming the drone video and starts to configure the robot to output 2 streams, one for remo.tv and one for rtmp so he can stream the rtmp source directly through OBS to twitch.
Meanwhile he rescues the robot again and incapacitates it on a box so it can’t run away.
Scotty has a working camera source for OBS!
Some very brief stream shenanigans happen
Robot cam seems to “flash” grey sometimes on stream – unclear why for now – appears to only affect twitch stream and not remo
A short interlude in the stream while the robot drives round, plays with Alexa and talks to chat

00:58:37 Preparing a tilt function for the camera
Break over!
While Scotty lets the robot explore, he starts to look at adding pan&tilt functionality to the robot cam.
Using some brackets that were designed for him, Scotty proof fits everything together, trying to mentally put a picture together of things he has to prepare.
The robot starts saying ‘woof’ and ‘bark’ in the background while Scotty gathers the necessary bolts and nuts.
The robot asks for arms. Scotty replies saying he’s not sure that’s such a good plan.
With a plan in mind, Scotty sets to modifying the printed parts slightly.
The method used to print made the necessary bolt holes a little smaller than intended, these need to be drilled out.
Tigga helps by sharing how to mount servos to the brackets in “neutral” mode.
Interacting with chat, Scotty explains he’s loving the Twitch experience so far. He intends on making a YT announcement soon but is working on building out his resources a bit more.

01:28:03 Changing robot control type
“Alex, set a reminder for 5 minutes to kick Ferferite off”
Ferferite becomes the first user to redeem 5k channel points to solo control the robot for 5 minutes but forfeits his control to rudy4 as a thank you for giftsubbing Ferferite.
Sadly, Rudy appears to be gone so Ferferite takes control as intended.
Scotty continues with the servo mounts for the Robot Camera.
Ferferite is manually kicked once the timer goes off after which chat is told there’s a cooldown timer of 10 minutes on the reward so watch for it to become active!
Scotty has some minor issues with one of the mounts to sort. A sleeve or spacer is needed but for the purpose of this demonstration, glue is used.
Finishing up the mount, Scotty prepares to stick it to the robot while CollieCommander takes control of the robot.
Collie’s time eventually runs out, Scotty drives the robot back to himself and powers down the bot.
It’s noticed the lag is enough to be frustrating to deal with.

02:20:34 Installing the tilt bracket
After a brief break, Scotty grabs the robot, powers it down and begins the installation process of the pan&tilt
The intended placement of the servo’s doesn’t allow room for panning, a platform is needed but for now, let’s head off to the wood storage to look for some wood to quickly bodge something together.
Scotty cuts down an off cut he already had to size and starts to put the camera together but the camera flex cable is a little short.
This forces Scotty to ignore the pan servo for now and focus only on tilt.
The pan servo motor is removed to lower the tilt arm.
With Pan&Tilt physically installed, Scotty needs to solder a new header on to the PWM Hat.
“Mod a roomba” is mentioned as a next project (in joking)
Soldering done super quick! Scotty is able to connect the tilt servo to the PWM Hat.
Speaker and microphone are placed back on to the robot.

02:54:07 Programming Tilt control
With physical installation now complete, the robot is put back onto it’s incapacitation box and powered on.
Scotty makes a connection to the Pi with SSH and intends to configure Motor 4 on the Hat but there’s something up….
It appears the servo needs to be driven with 5Volts.
Scotty gets some cable sorted out to power the servo properly and powers on the robot again for configuration.
Through trial and error Scotty figures out the range of motion (230 – 450) and using that approximates motion limits per key press and sets boundary limits.
Configuring key presses in remo.tv lays bare some issues with the local config on the raspberry but it doesn’t take too long to solve these.
Scotty builds a quick home positioning trigger but decides he doesn’t like the home position so resets that.

03:29:24 Let’s fix the lag
Scotty would like to fix the lag but he doesn’t quite know what’s going on.
checking cpu load reveals quite high use due to ffmpeg
Changing ffmpeg stream preset to ultrafast seems to improve latency on remo but the OBS Stream is still lagged.
Scotty decides that as long as the driver has a good connection it doesn’t matter too much that the OBS stream to twitch lags by a couple of seconds.

03:43:17 Chat gets control back
@boxkid is given control of the robot but it takes a few mins before control is taken.
Scotty interacts with chat a little while boxkid drives around.
Some talk around rC3
This turns into other conferences Scotty has visited; Super Con, Hope, LTX, DEFCON, Vidcon, Vidsummit

03:49:39 Hanging out
As Boxkid is kicked off, Scotty investigates why the TTS isn’t working.
Chat is in favor of giving the robot it’s own twitch stream.
Scotty finds out the speaker was off but that battery is also low; he moves to check if he can charge the speaker off the main battery.
Success! It was simple enough; add a usbcable between the speaker and the pi.
TTS is confirmed to be working!
A small discussion happens on setting up remo and how the logistics of multipole channels may or may not work.
@SkaveRat redeems control of the robot and gets 5mins of fame
SkaveRat tries to use Alexa but when this doesn’t work resorts to immitating a cat.
Scotty would consider adding a manipulator.
The robot is opened up to the masses in closing as Scotty starts to tidy and clean the workshop to head home.
While chat talks to Alexa, Scotty is tipped that blocking the 3-6kHz audio range will stop the robot from talking to Alexa.
Scotty finishes up cleaning the workshop.

04:19:51 Winding down
As the robot interrupts him and he turns the volume down he signs off.
Have a merry Christmas or happy holidays!
Stay safe and have a wonderful evening.
]]> https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-6/feed/ 0 848 Building a robot YOU can drive around MY shop Pt.5 https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-5/ https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-5/#respond Sat, 20 Mar 2021 13:01:47 +0000 https://www.strangeparts.com/?p=844 Chat successfully drove the robot for the first time! They managed to form a democracy and didn’t destroy anything of value! That doesn’t mean that y’all aren’t a handful and don’t need babysitting though…

This was streamed on Twitch on Dec 21, 2020.

Special thanks to Greg Needel of REV Robotics and @Esden for the robotics care packages!

00:00:00 Stream starts
Stream Starts! Happy Solstice!
We have a whole bunch of regulars in chat!
Hopefully we’ll do a long stream today, Scotty is really looking forward to diving into the robot proper.
Robogreg enters the chat. Scotty does a very quick introduction.
No Ambrose today.

00:02:56 Shenzhen BBQ Bicyclemen anecdote
Interacting a little more with chat, Scotty agrees the BBQ bicyclemen are awesome.
Apparently local government is cracking down on them so they come out later.
Some of the best Shenzhen streetfood is found through these services though so it’s a shame they’re dissapearing.

00:04:08 VODs and what to do with them
VOD Talk and what to do with them!
Scotty professes to having been lazy and not downloading the VODs from day 1 so some of them have gone.
If anyone has any early VODs downloaded, Scotty would love to have them!
The vods will probably go onto a new YouTube channel.
After a suggestion in chat about youtube-dl, Scotty explains he uses twitch-dl
twitch-dl works ok but he wants it to automatically mirror everything and needs some additional glue. Scotty is looking for some python help for this.
Ideally he wants to contribute a patch to twitch-dl to mirror stuff back.

00:07:06 Scotty’s truck stuck in a ditch
A lot of snow has dissapeared in the Pueblo but Scotty went down the one road that still has snow and he got stuck in a ditch so there was no stream yesterday.
Scotty shares a photo.
With a winch, kittylitter and a tree, they spent 2hrs recovering his truck.

00:13:39 Workshop tour
After talking about Python for a bit and setting up his iPhone to use as a camera, Scotty gives chat a little workshop tour.
There are idea’s (not plans) for a Casey Neistat inspired TV on the door with a webcam to make door look transparent or DIY-Perks inspired LED window light as there are no windows and it’s not very good for mental health.

00:20:56 Robot recap and tool recommendations
Let’s get into robots!
Scotty is trying to pick and choose what to show on stream to make the streams interesting.
He runs through the next steps, what he already did, and some other plans for the robot.
Scotty will have to drill and tap holes into the aluminium base plate to install standoffs for the raspberry pi.
He first figures out where to put the raspberry pi and the power switch so he can mark where to drill and tap on the plate.
Scotty explains how he outfitted his shop. Going from 0 to a good shop in a short ammount of time meant he had to lean heavily on good recommendations (a lot from Adam Savage) rather than going through the organic growth process over many years.

00:28:55 Securing the power switch and Pi
After setting up the robot on his workbench and moving cam and audio over, Scotty begins by punching the holemarks he did earlier.
Ideally, Scotty would need an M2.5 tap but he doesn’t have one. He resorts to using M3 instead.
Scotty has his ducks in order and begins drilling the aluminium for the Raspberry Pi standoffs.
First drillbit doesn’t do much, perhaps dull? 2nd bit works like a charm.
after freehand drilling the mounting holes for the pi standoffs, Scotty punches the holemarkers for the switch on the aluminium edge
These mounting holes are also freehand drilled.
Scotty doesn’t have a tapping tool for a blind hole (hole with no exit) so he’s trying to drill a little farther to account for space for shiops and shavings to collect.
With the holes drilled, it’s time to tap but there’s a problem.
Scotty drilled 3.2mm so M3 tap won’t work. He needs to step up to M4.
Scotty first drills out the holes in the powerswitch mounting bracket to accommodate for the new size bolt.
Chat discussing tapping guides and shares Adam Savage’s tapping guide
Powerswitch holes are done!
Scotty fixes the powerswitch to the base.
Scotty interacts with chat a little, accepting praise.
He says he’s considering working with someone, offering a paid position on the StrangeParts Team for sourcing parts
Scotty spends a lot of time sourcing and some projects get delayed because of sourcing.
If sourcing sounds fun, let Scotty know through Discord!
Sourcing is a mixture of tracking stuff down on the web and talking with people to find specific items.
Scotty can spend half or whole days on this and is looking for someone to help out.
Find us in Discord or on jobs@strangeparts.com
Going through parts bins, Scotty looks for bolts, washers and nuts for the Raspberry Pi and PWM Hat
Scotty doesn’t tap these holes, they’re countersunk only.
He fixes bolts through them with a nut.

01:22:42 Anecdotes on unit testing and datacenter fires
Scotty gives us a story about his previous job at Google.
Triggered by @tzarc in chat explaining they were busy with unit testing.
Meanwhile, Scotty gets the Raspberry Pi installed on the standoffs.
After changing camera angle, Scotty tells chat another Google story about an SRE early in the company history.
The story goes that an SRE figured out a fire was going on in a datacenter based on harddrive failure monitoring alerts.
Talk morphs into how servers get names and what they do but, Scotty has more or less completed the powerswitch and Raspberry Pi steps!

01:35:36 Securing the battery
After connecting all the pieces of hardware, Scotty notices he needs some way to secure the battery.
He cuts some velcro to size and drills a couple of holes.
Flipping the robot over to reveal the bottom, Scotty starts to tap the holes but disaster strikes!
He snaps his first tap.
After redrilling new holes, he taps one normally and the second with a drill (not enough clearance for the tool)
Scotty lines up the velcro but decides to retrieve some scrap wood to use as a backing to drill holes in the velcro.
Hits his head pretty hard and loses an earphone in the process.
After regaining composure, the velcro straps are fixed to the base and the battery is secure!
Scotty takes a few minutes to catch up on chat, get his desk setup sorted.
He shows chat a view of outside.

02:10:26 Soldering, connecting and powering, oh my!
With a lot of the base components connected up and fixed to the robot base, Scotty moves to solder components to the PWM Hat.
Chat moves to clip Scotty hitting his head.
While Scotty solders the pin headers for the motor controllers, he answers workshop questions posed in chat.
After a little research and consultation with Greg, it’s decided not to power the PWM Hat as it doesn’t separately power the motors.
Scotty puts the hat on the pi and hooks up the motors to the hat.
HE solders alligator clips on to the end of the battery power cable, powering the whole thing!
Unsure of what it will or won’t do when he powers it on (It should do nothing) Scotty makes sure the robot isn’t on the desk.
He accidentally flips it on when manoeuvring the bot – nothing happens.

02:39:01 Configuring connectivity to the robot
The robot is now safely stored away on a box so Scotty can now begin the programming process.
OR so he thinks, first he needs to ‘configure to brake’ (a motor setting to stop the bot from coasting)
Referencing hitting his head, Scotty notes he has blurry vision.
While updating the robot with various installs to support remotv etc, Scotty goes through the rest of the steps and documentation to prepare anything he may have missed.
It seems the ADAFruit PWM is supported OOB which is a bonus!
Once all the various packages and parts are loaded, Scotty can start to setup the controller.conf file
Through various troubleshooting cycles, Scotty eventually figures out he’s missing the Adafruit_PCA9685 package for python

03:07:26 Configuring robot motion controls
Oh my god, something moved!
One motor moved when Scotty pressed “forward”!
Through trying random actions, Scotty notices he likely needs to setup/code/program/”tell it” to use more than one wheel.
It takes a small while – Scotty needs to read through a lot of documentation and work out which avenue is best to pursue.
Eventually opens adafruit_pwm.py to look at motor control code
In a copied file of the original config, Scotty starts to experiment and tune the config to figure out how to control motion.
It’s a very trial and error based process with a lot of interaction with chat and looking through either libraries or examples along the way.
Topdown cam is moved so chat gets a good view of the robot while Scotty tries changing variables.
After figuring out what max “forward” and “backward” values are, Scotty calculates the “stop” value and tests his findings.
Setting all motors “backwards” reveals a caveat – opposite motors need to be driven in opposite directions. If they all spin clockwise, the robot will go in circles.
To make things easier for humans as direction + speed is dictated by on a numerical scale from 92 to 520, Scotty makes a convert map to map -100 to 100 on that scale.
Now instead of remembering 92 to 520, Scotty can code using -100 to 100.
Scotty, referencing Agile Spike Work, explains to chat he’s just worrying about getting a thing to do something. It doesn’t have to be pretty or valuable, just as long as it works, he can “refactor” or make it better in future iterations.
He quickly created a custom module with updated commands for “forward” and “backward” but this seems a little too fast
a moire suitable speed is dialled in pretty quickly and now Scotty can make progress quickly.
After deciding which buttons will be turn and strafe, Scotty consults a diagram on how to drive mecanum wheels, the associated configs are input but it appears the way mecanum wheels are setup, left and right were reversed.
directions are reversed and normality is restored.
Turning left and right was easy to configure as that’s tank driving.

04:01:38 Giving the robot an eye
Raspberry Pi Camera? And declare victory and unleash it upon the world?
Scotty wants to find a way to let someone else drive the robot safely so he goes to find his raspberry pi camera and lenses.
Scotty grabs a Pi Cam HQ and a 6mm wide angle lens.
It’s installed quick enough but there’s no obvious way to mount it so Scotty drills a new 1/4″ hole
The raspberry pi camera is attached directly to a bolt which is bolted through the bottom plate with a nut, no threading required.
Scotty enables the camera in the pi config
Answering a pressing chat question on OBS noise filters (RN Noise in OBS) Scotty troubleshoots why the camera isn’t immediately working.
chat offers additional troubleshooting steps, Scotty obliges and proves the camera works by taking a still.
Weirdly, camera image just “starts” on remo.tv All Scotty has to do is fix focus.

04:29:24 Chat is unleashed upon the robot
We have focus! The robot has an eye!
Scotty drives the robot first, he does intend on letting chat try it but Scotty wants to be first.
“What could possibly go wrong?” as chat are given the link to the robot
Apparently, control is shared between everyone on the link, there is no “time slicing”
Chat starts pushing a chair around the workshop.
Pan/Tilt options are mentioned, Scotty has servos, he needs to print brackets.
Chat would like a ball to play with.
Chat is given one of Ambrose’ chew balls but the robot is too large and runs it over.
Chat successfully scare Scotty by knocking a waterdish.
Scotty is trying to figure out time slicing to limit control to 1 user at a time
Summing up chat’s achievements, Scotty commends us;
“You’re successfully controlling a robot. YT have formed a democracy and you haven’t yet destroyed anything of value. This is going well.”
Scotty wants to hookup Text to Speech (TTS) but will need a speaker to do that

04:43:52 Improving on the camera’s location
Chat knocks the camera again and needs to be saved by Scotty.
To stop this from happening again, Scotty moves the camera back by drilling another hole through the base plate.

04:50:51 Chat form a democracy
Robot boots again with improved camera position
Scotty looks but can’t find a speaker to add to the robot now.
Chat manages to tangle the robot in Ambrose’ leash
Scotty lists he would like to add headlights, a speaker for TTS and Pan/Tilt for the camera.
Chat manage to knock over a broom in the storage room
Going through his Arduino kits, Scotty has a look to see if there is anything of interest for the robot.
Answering chat, Scotty confirms the plan is to have channel point redemption setup private control of the robot for a given amount of time.
Sadly, the arduino kits didn’t contain anything interesting to add to the robot.
Meanwhile, chat manage to push a ladder in wood storage so far that it wedges between a rack and the wall, thereby trapping the robot.
Scotty refocusses and starts figuring out how to connect the robot to a bluetooth speaker for TTS.
Robot is rebooted after installing bluez-tools and comes back online, blind. Once again, camera just “starts” working without a real cause.
While troubleshooting Bluetooth woes, the robot appears to “stuck” on a command and needs to be rescued.
Scotty notices chat unplugged one of the motor power wires, or perhaps he did, it’s unclear.
chat gets a third person view of themselves stuck on the broom handle.

05:20:11 Adding Alexa as a bluetooth speaker
@boxkid suggests checking raspiconfig for bluetooth settings.
Scotty checks this but chat interrupts claiming success – they switched the robot off by backing into the power switch.
After rescuing chat again, there remain config problems with bluetooth on the raspi
Scotty starts to wind down as he reboots the robot one last time after trying another bluetooth config change.
Scotty cleans up his shop as he leaves stream running and the robot in the incapable hands of chat.
Scotty ends Stream as chat powers down the robot.

05:48:10 Winding down
]]> https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-5/feed/ 0 844 Building a robot YOU can drive around MY shop Pt.4 https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-4/ https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-4/#respond Fri, 19 Mar 2021 13:06:51 +0000 https://www.strangeparts.com/?p=837 Now that the robot has wheels and motors, it’s time to figure out where the brains and control components go. Chat helped me brainstorm names for the robot and and I worked on placing various power components.

This was streamed on Twitch on Dec 19, 2020.

Special thanks to Greg Needel of REV Robotics and @Esden for the robotics care packages!

00:00:00 Stream starts
Stream starts. Hello everyone! Happy saturday!
No Ambrose today!
Smalltalk with chat about streaming on Twitch vs YT.

00:04:07 Show & Tell: A fried wifi plug
Scotty has something to show chat before getting into the robot.
Scotty has a wifi plug which fried on him.
Sure enough, as he suspected, it’s an ESP8266 with a relay, some caps, a voltage regulator and some other parts.
Scotty gets the microscope to get a better view
There’s a BoyaMicro 4M external flash for the ESP8266.
Might be interesting to flash it with some custom firmware at some point
Checkout ESPHome.io.

00:14:23 Robot status and next steps
Let’s do some work on the telepresense robot.
Scotty does a short recap for chat.
The idea is to use channel points to provide access to control the robot for a short while.
Scotty needs to add control circuitry.
He has a Raspberry Pi that’s updating and almost ready to go.
We also have an AdaFruit PWM Servo hat, Spark Mini motorcontrollers, power switch, Power distribution block and a buck converter.
Alot of aforementioned supplied by @Robogreg of REV Robotics, thanks!

00:20:06 Robot needs a name and motor controller installation
We need a name for the robot!
Scotty starts laying out the various parts to work out where everything should go.
With some minor assistance from Greg, Scotty hooks up motor controllers and gets other components connected and laid out to give him a good idea of where to put everything.
@DrZzs raids with a party of 41.
Scotty gives the raiders a quick recap of where he is with the robot build.
Scotty isn’t sure how many channel points it’ll cost to control the bot.
Scotty is invited to follow @DrZzs for Home Automation ideas. He follows.

00:34:15 Freelance tips
LearnWithLeon raids with a party of 190
LearnWithLeon was streaming WebDev Freelance help.
Scotty gives freelance tips revolving around working with ethical clients over unethical ones. Check vod for more!
Scotty shares his first freelance experience in an internet cafe in Thailand.

00:40:25 Distro block installation
Back to the robot!
Scotty figures out which way to put the controllers, where the Pi goes and the Distro block.
Once a basic layout is decided, Scotty gets double-sided tape to start to make the layout semi permanent and work with cables.
After the motorcontrollers are stuck down and connected to the motors, Scotty takes a quick break.

00:54:36 Robot overview
Back from break!
“Nah, we don’t need no stinkin’ proximity and imu sensors!”
“It’s chat’s own decision what to ram into!”
Scotty hooks up the switch and power distribution block
The understanding is that between the Mac Pro wheels and the robot, the wheels probably cost more.

01:03:56 How to mount the Pi?
Scotty looks into how to mount the Pi and PWM hat.
Standoffs are defintely needed.
By cutting the battery cable in half at Greg’s direction, Scotty now has an additional power cable he can use for the buck converter.
While chatting about how to control the robot, Scotty discovers the Buckley converter doesn’t have mounting holes or brackets.
Figures he can use electrical tape and moves on.
Scotty’s timer goes off telling him to start winding down.
Scotty checks out how to place and route the PWM Hat, chat helps him by reporting there’s a camera connector on the hat.

01:16:13 Winding down
Scotty ends stream by raiding raids diatomsattack
]]> https://www.strangeparts.com/building-a-robot-you-can-drive-around-my-shop-pt-4/feed/ 0 837