Haystack of Activity

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I seemed to do a little bit of a lot of stuff related to working on with a Raspberry Pi. Let’s get started!

Stated project goal: Develop a tool so I can code with my laptop, but execute on Blinkie.

I went into the workshop relatively early today (Sunday) with my stated objective. In light of my fragile case being fragile, I elected to just take my SD card “solid state drive” in to see how my setup reacts to different hardware running things would act. There were some interesting results. The following sub-projects happened concurrently.

The first project was setting up the new Raspberry Pi 3 B+ the workshop has to mirror my setup. It came with a metal case —titanium if I remember correctly— and I got to assemble the ting. There’s just something about a proper case that just feels right. As soon as I slid the board in, so satisfying with it fitting perfectly.

The case doubles as a heat sink, complete with thermal paste. While I want to do that eventually, I decided to wait a while until I’m ready to seal the case for good. I have two ports I intend to use within the foreseeable future: the camera port and the GPIO port. Both have slots in the case to accommodate the relevant cables.

The GPIO port was the first to go on. Since I really didn’t want to mess anything up, I didn’t use enough force to seat the ribbon cable connector correctly, and couldn’t close the case. I tried looking for a way to test for an electrical connection, but ended up probing the female connector with another part and verifying it could take the whole length of the pins. I pushed a bit harder and managed to get it in there.

The camera port was more straightforward. Same as before, I just lifted the little plastic piece, inserted the comparatively narrow ribbon cable, and pushed down to have the port bite down. On the other end, I sat a Pi camera for testing purposes.

In the best case scenario, the cables would barely poke out of the case with maybe an inch or two to spare, and I could just connect to external ports like they were on the board itself. No such luck here. In testing, the camera failed to take a picture because it wasn’t detected.

My second project was backing up my SD card. I found a utility to make an image of my card. It wasn’t the best coded piece of software; it refused to make a new file to save to, but I renamed a new .txt file and got it to work. It took half an hour, during which I worked on the other projects. I did not have a spare SD card to test the image on, but there was a warning about similarly sized cards being slightly different sizes when they’re from different companies, and not to try applying a larger image onto a smaller card.

My third project was testing how the workshop’s Pi handled running my SD. I expected the MAC address to be different, but otherwise nothing else. I was close: PuTTY warned me about a different host key, and had me log in with the password the first time, but otherwise didn’t have any other software problems. I had to let it to connect to my phone, but that gave me an idea for my next mini-project.

My fourth pseudo-project was just some general knowledge base maintenance. I had a few questions, and not all were answered. I connected both Blinkie and my laptop to my phone, where I would expect them to work similarly to a local area network. I used traceroute from Blinkie to my laptop, but ended up with over 30 hops. Yikes! Honestly, I have no clue what’s going on with this one just yet. I still need to look up the difference between a hotspot and a more conventional router. For all I know, it could just be no discovery turned on or that it acts more like a gateway to a larger router. Possibly both.

Final Question: What do you do while code is compiling or otherwise waiting on a computer to finish?

Blinkie Pie Case Repair: Stage 1, Part 2 (of 1.5)

Good Morning from my Robotics Lab! This is Shadow 8472, and I am never using Stage/Part sections again. Let’s get started!

Last week, I tried super gluing Blinky Pie’s base back together with unpromising observations. After two successful runs gluing segments of an interrupted print to its own raft that I somehow still had around, I went on to the main event, but it failed hard with the broken tab springing away from its base.

I hardly touched my project all week.

Sunday came and I forced myself to work on it. I was expecting to clean it off with some acetone and start over again, this time with the baking soda method that gives the super glue something to latch onto.

I pulled my project out and took inventory. I was surprised to find that not only had the broken piece returned to its proper seat, but it was holding up to a semi-reasonable amount of pressure. No way am I stress testing it, but I’m hopeful this case will continue to serve me for a long time to come as will be.

I set the base aside, then had help from my father tending to the top half. I took the camera out last week, so it wasn’t attached to any electronics or anything. As it stands as of writing, the glue is not quite to the 24 hour mark needed for full strength.

Next week, I expect to do a little sanding and painting on Blinkie’s dome head, but only if there’s glue oozing out the back.

I’ve also had a vague thought that I’ll need to get into soldering some day. It’s no time soon, but I really hope it’s not too much of a challenge.

Final Question: If you were a real-life spacecraft, what would you be, and why?

Blinkie Pie Case Repair: Stage 0, Part 2

Good Morning from My Robotics Lab! This is Shadow_8472, and today, I have another less-than-full speed progress ahead story. Let’s get Started!

The story so far: I crushed my Blinkie Pie case while it was in my backpack. The damage isn’t terrible, it’s just inconvenient enough it needs to be addressed. One long tab is 99% broken off, and part of the top is peeling away from the rest.

I researched a bit more with my father. It looks like some super glues work well for this kind of thing while the cheaper kinds usually don’t. Another tip was to use baking soda or some other kind of powder to use it as a filler material.

The experimental stage went surprisingly well. I have an aborted print and its original raft I can test glue techniques on. We tried the baking soda method, but the bottle was starting to thicken up. It didn’t mix well with the baking soda and didn’t hold. I went into the workshop and made a bead of some high quality stuff with a fine application tip, and did two test pieces; both were without baking soda, one pressing down the whole time — the other only pressed down after, and both turned out strong.

I went to repair the original in the same way and discovered that super glue can be disagreeable.

I tried multiple times, but the bond wouldn’t hold. I’d think that parts broken from each other would naturally be the perfect surface for each other, but my test failed. The plan now is to try using acetone to remove the residue. After that, I’ll want to test out a number of procedures on my dwindling test supplies.

One drastic method would involve heating the base material with a soldering gun or something and melting some new filament in there. I’ve heard there is such a thing as a 3D printer pen that –while cool and useful– will probably turn out to be something niche.

Another real possibility is to try the baking soda again with a thinner super glue. I’ll need to make sure it actually soaks in this time.

Sanding the parts’ faces and applying super glue to the resultant faces is another option. I’d be nervous of it not being perfect, but if I was really after that, I’d just reprint the whole thing.

Whatever the case, the crack in the case head will be more challenging to approach with how tight it is. I’ve given up the notion that I can get away without a paint touch up, but I’ll still hold out a modest bit of hope.

Final Question: random edition: pronunciation: dAta or da-ta?

Blinkie Pie Case Repair: Stage 0, Part 1

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I can’t find my underscore key! I must have tried at least ten touch type attempts trying to find that stickler before I hit it. Today, I am actually planning out a new project: repairing my Pi case. Let’s get started!

Update on the bot: Project Canceled. Everything –and I mean everything– I saw said Discord audit logs would be available until 90 days after the incident. They vanished, and a screenshot I had of the logs the day of was only 55 days old. I contacted their support, but they eventually told me, “The team has confirmed that it is an intended behavior with audit logs. And we can’t offer troubleshooting steps to fix it,” and to “Please update us here [Discord feedback] if you have further inquiries.”

…

I really need to pay closer attention before I say something to the effect that they are doing a terrible job. The support was friendly, and usually got back to me within a day. It was only after I replied to that last one and expected a reply that my opinion tanked. I might be coming back to it yet.

Moving on to the subject I actually did my research for today:

I crushed my Pac-Man Ghost case while transporting it a month or so ago. I want to repair it. I went into the workshop to brainstorm. I learned a about techniques for joining PLA pieces, but I can tell this will take a lot longer than I had hoped.

Both the top and bottom are damaged. The head piece only has a crack going even through the paint, while the bottom has a broken tab piece hanging by a few lines of filament.

The quick and obvious solution is super glue. I’ve been warned against it, but I think that may be the way to go for the head piece because it’s otherwise mostly structurally sound. The bottom piece will require a little more creativity.

I read about two other repair techniques, one of which I was already speculating about. Friction welding, would be if I heat it up with a small motor and quickly press it back together. Soldering would also work, and hopefully not lose any material, but will require additional dexterity.

Worst case scenario: I botch a repair of the bottom and end up printing a new bottom. If that were the case, I’d want to get in there with Blender and adjust the inside to actually match my Pi 3B+ model instead of the Pi 2 it’s designed for. I’m expecting this project to last at least until Christmas, even if it’s not interrupted by something more worthy, like picking up on that bot project again.

Final Question: What PLA repair techniques should I research?

A Seemingly Complete and Utter Waste of a Blog Post

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m finishing my discord bot! and today, I’m getting back into my Pi Spy Feline Edition and today I’m solving — exploring the pseudo science behind a chapter in a book I’m writing. It’s not quite on topic, but let’s get started anyway.

I was supposed to have 90 days of the audit log. They dissipated after 55 days. I took screenshots the day of, and the file will be 56 days as of this posting. I’m a tad annoyed, but at least I learned something along the way.

I would have been interested in getting back into dealing with Blinkie and the kitty caller, but the case is broken and it still needs to be repaired. I’m hoping I don’t have to reprint the whole thing. Maybe I will see about using a soldering iron… I might actually try that one.

OK, onto business. About two years ago, I was in a role play set in the world of My Little Pony: Friendship is Magic where I took the role of two characters: a little Unicorn foal by the name of Applesauce, and an elderly Crystal Pony by the name of Professor Stone W. Jay PHD. I eventually settled on calling him Dr. Stone. I later found out about the manga of the same name. There is no relation between them.

At the end of the first big section of the game, Dr. Stone is in a small town when a dimensional rift opens up and starts spewing enemy soldiers. Having had military experience in the past, Dr. Stone takes command and MacGyvers a temporary victory.

In my novelization, I decided I wanted to add a nod to Physics without kowtowing to it. Since this is a magical setting, I decided I wanted a time dilation field so that as you approach the rift without the proper spells on you, your personal clock slows down, but you don’t suffer the tidal effects one would normally expect from several solar masses crushed to a point mass and placed in the town square.

My original question was along these lines:

  • Dr. Stone is at 50 <= r <= 150 feet from the rift.
  • Dr. Stone experiences 15 <= t(observer) = t(o) <= 30 minutes.
  • The world outside the significant effects of the time dilation field experience 3 <= t(fast) = t(f) <= 6 hours.
  • The rift in the town square respects time dilation as if it were a singularity with enough mass to dialate Dr. Stone’s frame of reference by the factors given.
  • The rift’s opening is no bigger than a pickup truck, but no smaller than a human.
  • Does Dr. Stone see an Einstein’s Ring?

I’ve researched by posting in forums and over Discord. I’ve gotten a whole array of people responding from one or two overly blunt Discord users who wouldn’t buy into my fantasy to an Oxford professor who unfortunately didn’t know anything either.

I did manage to get the attention of a few helpful individuals; one suggested lighting effects while another got me thinking about temporal gradients internal to the body. One individual going by Needling Haystacks has been particularly helpful as someone who knows a bit more than me in the topic. Turns out, the air around the singularity would mess with any Einstein’s ring in the first place.

In the search for an equation to work, I found one for stationary satellites above a non-rotating sphere, then I spent whole evening learning about the universal gravitational constant “big G” and not finding it expressed in Imperial units, likely because 99.99 percent of all people with any business even trying to understand equations with big G are already familiar with the SI system.

At this point, I managed to plug in all the variables in and my graphing software gave me a shape I wasn’t expecting. I’ll need to run some more tests.

Final Question: Have you ever gotten overzealous over what’s supposed to be a small detail, but ended up with something much different?

Programming a Discord Bot Part 3 (of 4 for sure)

Good Morning from my Robotics Lab! This is Shadow 8472, and today, I am excited because I recently got a working prototype on my “preemptive” ban bot. Let’s get started!

First of all, I won’t claim to understand most of the stuff I’m working with, just that it isn’t as closely related to security as my last side project. If someone working all day every day could have done this project as easily as walking through a room, I would be crawling through a hole just barely my size. I’ve had a lot of help drilling that tunnel, and now widening it looks like it will be a whole lot faster.

A lot of what I did was trying to understand how Discord thinks, not quite fully getting it, getting help, and only understanding it until I needed another reminder. The long story is that I couldn’t repeat most of the details from memory. Guess what I’m basically doing right now.

I’ve been using PyCharm on my laptop as my IDE. On one of my previous trips to the workshop, Headcrash showed me how to use the debugger, but the neuances didn’t really stick. Before I went in this week, Damaged, the person who’s been helping me over Discord, helped me get through multiple hurdles, some of which should be obvious, others not so much. I was working up until right before sundown Friday, when I stopped for Sabbath.

The next night, I spent not two minutes before bed so I’d actually work on it in the morning, and got the early prototype working: I had someone on my a ban list who had never even been invited. Of course, I made a backup.

The next phase involved disarming the ban function’s “warhead” with a long comment and having it pull the target’s ID from the audit log. The function to loop over the audit log is even pretty user friendly at first glance. It was at this time I reached for a tool I wasn’t familiar with: the debugger.

A debugger is no doubt a valuable tool to know once you know how to use it. I came to a point where I had been introduced to it, but when I tried to use it, I tripped up on a small detail and took it in to the workshop. No sooner had I recreated my error and started explaining my problem than I poked around a little and figured out the answer on my own; the debugger has its own tab. I still learned a lot about how exactly this debugger works and how its interface is different than the ones I played with in the past.

At present, I have an untested/unproven candidate for my final bot before setting it loose on the real server. Right now, it can be told a bad mod’s ID and target logged unban events made by that account. When I’m done, I plan on having it tell me the names and numbers of all the people who were maliciously kicked.

Final Question: The filter for the audit log was not as user friendly as I had hopped., but not as bad as I feared (with the power of the debugger to view all active variable names and values at key points in the program). Have you ever come across a problem where the solution was on the path to that problem?

Programming a Discord Bot Part 2 (of 3? hopefully)

Good Morning from my Robotics Lab! This is Shadow_8472, and today I can taste victory on this mini-project, but as you can tell from the title, it shall be denied for this week. Let’s get started!

Last week, I talked about getting the PiCharm IDE running, and how it’s only as useful as the person maintaining it; as long as someone in the room knows what’s going on, things can get repaired when they break.

This week was another one where I went around building up my knowledge without feeling like I made any tangible headway. I keep telling people, “If I knew exactly what I was doing, I’d be done in two minutes,” and I still stand by that statement. Most of programming is figuring out how you want things to work overall, how your component parts were designed to work, and how the incomplete product actually works, then reconciling all three.

I spent most of my time studying how the async/await model of computing works. Before this week’s project chapter, I knew about multithreading and hyperthreading. All three are models for working on more than one thing at once in a CPU, and each has advantages and challenges. Imagine a computer thread as a guy at a workstation. Multithreading would be adding another guy at another workstation. Hyperthreading would be convincing two guys to share parts of the workstation they both aren’t using at the same time. “Coroutines” would be the first guy stepping aside from the workstation while he waits for more work to do and lets the next guy have a turn.

Other than that, I explored Redbot, some sort of bot to program for Discord. I ended up giving up on it for this project because it was a little expensive on the learning curve for me right now, and I’m not entirely sure it will suit my needs for now.

In the meantime, I’ve made the slightest of “outreach progress,” (yes, I just made that up to talk about when you aren’t ready for something, but try it anyway). I don’t know what’s going on, but hopefully I will know soon.

On the whole, a lot of my projects remind me of a few stories from doing trail work in Pathfinders, a youth club run by my church. One of our annual events involves working on trails at a local State park. While flattening the trail, everyone runs into rocks. Usually, they can just be relocated to somewhere nearby for drainage purposes, but every year, it seems, someone finds a rock in the way that just keeps going until it takes four or five teens to properly move it around once loose. Most of my projects feel like one of these boulders.

On the sad end of the spectrum, I was irresponsible with Blinky’s case. I ended up crushing it. Hopefully, I will get around to seeing to its repair.

Final Question: Windows recently updated. Among a bunch of stuff I didn’t bother reading, I spotted a Dark Mode feature I’m taking advantage of. Do you prefer to keep using the standard, bright theme, or will you be switching over to the dark theme?

Infrastructure Update

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am going over a few changes to my immediate setup. Let’s get Started!

I’m afraid I have some sad news to start with. I’ve been shuttling BlinkiePie around in my backpack, and it’s finally caught up with me. Some time, some how, I wasn’t careful enough, and the case broke. Some time in the near future, it will likely be getting a dose of super glue, but I’m afraid the base will need to be reprinted. If it does, I will be modifying the case so the screw holes actually line up. If I’m feeling especially adventurous, I may even make it accept multiple models of Pi’s.

I otherwise had a few adventures this week. Neighbors were having work done on their house, and I needed to go out and about. I took Blinkie with me, and tethered it to my phone, as well as my laptop. PuTTY wasn’t fully happy. I spent a long time chasing down the supposedly different server key fingerprint, but I didn’t actually find for 100% sure. Since this is a security issue, I’m not going to share my best guess I’m about 90% sure on.

On Friday, I was expecting to spend a couple hours working on my project while my mother was working at the church, but my laptop politely asked to update like I told it to. I didn’t pay close enough attention, and I found myself stuck there for four hours so I could press F1 about three times during the massive update. I’m thankful I stayed, otherwise I was within a minute of having to leave it over Sabbath, and there are always a lot of people in the church office on Saturday morning.

I won’t say I like the update, but I won’t say it isn’t all bad. On the plus side, Windows now has a system-wide dark mode, a feature I personally find appealing. On the minus side, my laptop’s fairly old, and each new line of code it must run to keep up is that many operations not servicing the programs I want to run.

Speaking of programs to run, I went into the workshop and set up for working on Blinkie over SSH and the command line, but I was advised to install an IDE (Integrated Development Environment). I was even there an hour, and Headcrash, the guy running the place, replicated my present progress while we were talking. He talked me into installing PyCharm.

I came up with the comparison that the difference between IDE’s and command line work is the difference between a graphing calculator and a pencil. The pencil is simple, easy to pick up, and important to understand how to operate before using an IDE. IDE’s on the other hand, take care of a lot of things for you. It blasts you with so much information you don’t know what to look at at first. And the scariest part is setting the thing up. There’s a lot of help out there for my “pencil,” but there’s a lot more to break with an IDE. It felt like I was slipping into a commercial airliner cockpit with only a driver’s license. I’m just glad I had someone there to figure out what was happening when something misaligned.

This week felt like a lot of learning curve walls.

Final Questions: Have you ever used a graphing calculator (outside school)? Do you have any other suggestions for comparison?

Programming a Pi With a Discord Bot Part 1 (of 1 hopefully)

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I’m inching back into actual programming with the skills I’ve built up with SSH over the past month paving the way with a bit smoother workflow. Let’s get started!

A few weeks back, I was made an admin on a Discord server after an unsavory character I shall only refer to as Z nuked it majorly. He took advantage of the owner’s weakened state after constant raids, unbanned pretty much everyone, and kicked about two thirds of the total population. Z’s rampage went on for around 10 minutes, but he caused massive damage.

As an admin, I’m helping rebuild the server. One of the tasks is rebanning everyone Z unbanned. Oops. Discord only gives you the option to ban someone if they have some sort of presence on the server by way of being a member or having a message.

When Discord bans someone, it offers to permanently delete a few days of messages from them. Troll tactics often involve getting a bunch of alt accounts on at a time for wide-spread harassment. When the server staff is doing a good job, alt accounts get banned quickly, and all traces of them are incidentally removed from the server. Bad news for me when trying to reban.

The good news is that Discord have a little more access to Discord’s full feature set, and one of those tools is banning accounts without needing a membership or a post. However, with a new goal in a slightly unfamiliar field, that implies new learning to be had.

The first step was defining what exactly I want it to do: Reban the unreachable. Next, I settled on hard coding each name that still needed banning. I’ve had issues with bot stability when running someone else’s dice bot myself, but I don’t need to worry since the finished bot need only run once and it’s done, ready to archive.

The hardest part would have been getting Python3 on. Lucky me, I have the earliest version of Python supported by Discord’s Python wrapper already installed on Blinkie from my naughty kitty project. I just had to install a few dependencies.

I met someone on Discord by the handle of Damaged who I got the majority of my assistance from. They actually pointed me in the direction of programming my own bot instead of just trusting someone else’s. “What I can say is that you need to be very careful of any bot you want to get to [ban people]. You’re effectively going to give them the keys to the castle.” Security is of concern. I once hacked a new bot (with permission from an admin) into pinging everyone when a normal account doesn’t let you do that. The last thing I want to do is let possible trolls have devastating tools I left laying around.

Banning doesn’t sound like anything too fancy to program, and the skills and tools I develop for this project should be useful later. I learned how Discord bots log into bot accounts with some kind of token. I learned how to tell the bot to print its account ID to the command line and use that to add its account to a server. As of the writing of this post, I have gotten a sample bot debugged and running and responding to a simple command.

The next step was a little revision in plans. I have about 50 names to reban or so in total, and bots can theoretically easily do the deed quickly and more thoroughly than I can. I figured it was likely somewhere around a wash, so I’m going to program a bot to look for all Z’s unbans and reban them.

Other possible bot features I might like are the ability to nuke someone’s entire history with the server. Another person who left now has a crude name I wouldn’t mind if it were gone.

Final Question: Not all bots need potentially dangerous permissions to run. What are some niche moderation bots you’ve seen/used?

Programming a Pi to Deter Cats: Part 9.4

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am glad to say I have finally learned how to beat SSH keys into submission. Let’s get Started!

Computer security is important to get right. The moment you connect to the Internet, you potentially have a near infinite number of burgles trying to break into your device. That is why we have virus scanners and firewalls. SSH is an important and powerful tool for working with headless computers, but if mishandled, it can open a hole in your network security. That is why I always make sure I know what I’m doing and that someone else knows what I’m doing. Because if I don’t get things right, I may be looking at a dozen or so weeks learning about removing malware. If you are trying to learn any skills that can likely compromise your computer security, please seek supervision from someone who already knows how to do it safely.

I spent a lot of time in the workshop this week because I wanted to be sure I was being safe. Like my pile of sand a week or two ago, I had to learn a lot before the final pieces clicked.

SSH (Secure Shell) is a secure way of logging into another computer over a connection that can be assumed to have anyone may be listening in. When set up with SSH keys, a client program first asks the server for its host key. If the host key looks familiar, it’s probably the server the client thinks it’s connecting to. If not, the second layer of protection, host keys, let the client and host negotiate a way to scramble their conversation without eavesdroppers understanding.

Setting SSH up correctly is a bit more tricky to understand. I’ve heard there are lots of tutorials to disable the host key check because it’s annoying. Seat belts are annoying, but if they protect you even just once, they save you a lot of hurt in the long run. I don’t understand the differences between each host key, but from what I can tell, each computer, or at least each server, has one for each type of encryption. Blinky, my Raspberry Pi, came with at least six host keys.

Final Question: one of the challenges I had setting things up was being sure I was connecting to the server I was connecting to. Granted, it would have been safe in that instant to just click through. When was the last time you spent a lot of time figuring out why something works instead of just accepting it works for now and moving on?