Monday, October 26, 2015

Sword for The Spider Ninja!

A new attraction is opening up at Winterground Fairlands! "The Adventures of the Spider Ninja"  It's an exciting attraction with Spider Ninjas, and various challenges and action and probably a lot of running around with swords.  This attraction required costuming to create something all new for the cast members.  Shown in the picture is Jasper with his uniform.  The ninja mask and spider outfit were created by Pam the Costumer specifically for Jasper's small frame.

The new swords were built using various corrugated cardboard products.

The blade was made by rubber-cementing three layers of cardboard together, with their "grain" going in different directions for strength.  The blade actually continues through the hilt and into the handle, much like a real metal sword.

The handle is just a piece of thick cardboard tubing originally from wrapping paper.  It has a smaller diameter and is stronger than paper towel tubing to accommodate the cast member's smaller hands.

The hilt was a paper towel tube, with a round hole on one side to accept the handle, and a rectangular hole on the other side to accept the top portion of the blade.

Once the blade is pushed through the hilt and into the handle, everything fit very snugly, and didn't need any additional adhesives... but just in case, and for extra strength, the hilt was loaded up with lots of hot glue, and additional glue was added around the joints from the outside.

A couple coats of plain 'ol black spray paint and then the fine detail work could be done.  Jasper added some spiders he made out of Perler beads and the sword was completed!

Monday, October 19, 2015

Major Blog Announcement!

Hi and welcome to the new readers!

Just to let you all know, this blog will be slightly changing over the upcoming months.  The focus will still be on projects that we're working on/have worked on... but for a new venue

!I've recently picked up and moved to Sklarsville, Maine and am working full time at the world famous Winterground Fairlands Park and Adventurefun Center!!!

The wonderful part of this whole thing is that being hired as the head of the "Funmagineering Gang", I am able to make posts about the various projects we're working on for the park and in our skunkworks in general. There may even be some great blue-sky projects we'll be able to share with you!

So sit back, and "Enjoy the Adventurefun!"TM

Tuesday, October 13, 2015

Nintendo DS Lite case mod

Many years ago, I bought a white Nintendo DS Lite.  I loved the form factor, the look of it and the games I could play on it.  There were a lot of games for it, and for the GameBoy Advance which I already had which I'd love to play on it.

Over time, I've gotten a R4DS card so I could play homebrew (yeah, let's go with that) and use it as a kind of PDA type of thing. I also got an EZFlash V for the same reasons. For homebrew. Because that's still a thing, right?  (The screenshot above shows the R4DS interface, which I've re-skinned to like AmigaDOS 1.3 because that's something I do.

Anyway, at some point, I got a completely transparent shell for it, which was really neat for a while.  It was a pain to move the guts over to that shell, but it looked neat for a while.  Then The upper screen failed and the touch scanner failed on the bottom.  So I replaced those.  Then the right shoulder button failed, so I replaced that... which never really worked well, as the button broke off of the main board. There just wasn't enough structure there to support it.

Fast forward a few years, and I picked up a European black DS Lite in a trade for some old GBA stuff I didn't want anymore.  That one worked GREAT, except that the screen hinge was completely destroyed.  I used that for a while, but ended up shelving it.

For a while I've been meaning to take the best parts of all of this and put together one fully functional DS Lite.

I had planned to take the top screen from the black unit, but the ribbon cable broke while I was removing it from that unit.

What I ended up with was this:
  • Case enclosures - White
  • Top and shoulder buttons, switch cover plastics - Black
  • Upper Screen - White (replacement, colors aren't perfect on it, but it's good)
  • Lower Screen - Black
  • Motherboard - Black
  • Battery - Black
  • Wifi Antenna - Black (The cable was broken on the white one)
  • Rubber feet, screw covers - Black
  • Stylus - White (Black one is on order)
I think the final form here is pretty sharp.  Best of all, it's fully functional again! Yay!

Monday, October 5, 2015

Arduino Ethernet Library Modification

I was recently working on a piece of test/demo code running on an Arduino that talked through a Seeed Studio Ethernet shield.  The standard Ethernet library will not acknowledge a connection back to the host code until it receives something from the client.  For most things, this works out just fine (HTTP, chat servers, etc) but in some cases, like for RFB/VNC servers, it must first send out something itself to the client.  The as-shipped library does not allow for this, so it required a minor hack to the library code to make this option available.

in (Libraries)/Ethernet/src/EthernetServer.cpp, we can see the following code:
  01 EthernetClient EthernetServer::available()
  02 {
  03   accept();
  04   for (int sock = 0; sock < MAX_SOCK_NUM; sock++) {
  05     EthernetClient client(sock);
  06     if (EthernetClass::_server_port[sock] == _port) {
  07       uint8_t s = client.status();
  08       if (s == SnSR::ESTABLISHED || s == SnSR::CLOSE_WAIT) {
  09         if (client.available()) {
  10         return client;
  11         }
  12       }
  13     }
  14   }
  15   return EthernetClient(MAX_SOCK_NUM);
  16 }

As you can see, it checks to see if there is a connection established (line 08), then it checks to see if there's any content available from the client (bolded line 09), and only then will it return the handle to the newly connected client. This will be called in your Arduino code like this (from the WebServer example, packed with the Ethernet library)
void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // do stuff here...
    Serial.println("client disconnected");

This loop will only make and break connections if the client is actually connected AND it has data available. For most servers, this is sufficient.  However, if you want to allow for clients that connect and then just listen, you need to do the following...

In EthernetServer.cpp, create a copy of the ::available() method, eliminating lines 9 and 11 above. I call this function ::connectionEstablished(), plopped right into the EthernetServer.cpp file, just after the ::available() method, and it is implemented as follows:

EthernetClient EthernetServer::connectionEstablished()
  for (int sock = 0; sock < MAX_SOCK_NUM; sock++) {
    EthernetClient client(sock);
    if (EthernetClass::_server_port[sock] == _port) {
      uint8_t s = client.status();
      if (s == SnSR::ESTABLISHED || s == SnSR::CLOSE_WAIT) {
        // "if" statement removed
        return client;
  return EthernetClient(MAX_SOCK_NUM);

Next, you need to add the method to the header file, EthernetServer.h, as seen in this snippet
class EthernetServer :
  public Server {
    uint16_t _port;
    void accept();
    EthernetClient connectionEstablished();
    EthernetClient available();
    virtual void begin();
    virtual size_t write(uint8_t);
    virtual size_t write(const uint8_t *buf, size_t size);
    using Print::write;

Now, you can call this new method like this:
void loop() {
  // listen for incoming clients
  EthernetClient client = server.connectionEstablished();
  if (client) {
    Serial.println("new client has connected");
    // do stuff here...
    client.println( "Hello, goodbye!" ); 
    Serial.println("client disconnected");

Thursday, September 10, 2015

Living Room Planetarium (work in progress)

This was just a quick brainstorm that I'm trying to poke at with a pointy stick to see if I can make anything interesting happen with...

The basic concept is to turn as much of the entire ceiling of my living room into a planetarium as possible.  Earlier, I had the idea to project video onto the ceiling, and lie down on the floor to watch movies.  The issue here was that I was getting ghosting of the image since I didn't have a front surface mirror to use.  The image was also fairly small compared to the size of the ceiling.

This brought in the idea of using a tele-expander, magnifier or convex mirror to expand the image on the ceiling.  While cleaning the basement I found a somewhat scuffed, convex plexiglass baby seat mirror. Just the perfect thing to try out!

You can see in the above picture the results of this first experiment.  The projector is precariously hanging on the back of a cat scratching post thingy that our cat refuses to use.  It's pointing down onto the mirror, sitting on the floor.

The image projected onto the ceiling is nice and big, although there's a hell of a lot of distortion.  The surface isn't perfectly curved, it's pretty badly scuffed, and it's a back surface mirror, so the image is distorted, fuzzy and there are ghosts and smears of the star points.

One thing I did notice though was that when I used more of the mirror to reflect the projector's image, the final image looked better.  I dug out the 0.7 wide angle screw on lens for my old Canon Optura DV video camera, and shoved it onto the front of the DLP with rubber bands.  This both maximized the image onto the mirror, and increased the size of the final image on the ceiling. It's still far from perfect, but not bad considering that I put this together with some rubber bands and a cheap mirror...

For the star field generation, I used Stellarium, running on my MacBook.  That side of it works pretty well. ;)

Tuesday, August 18, 2015

Retro Challenge 2015/7: Post-Mortem and project notes...

Current Project State

For this Summer's Retro Challenge (2015/7), I worked on a small widget that lets you use an Amiga mouse, Atari ST mouse or Atari-style Joystick.  I was successful in building it and having it be manually configurable.  There's a shell based interface that you can use to select which input device and output style is used.

All of the code for this project as well as further and future documentation is available at the project's github repository.

There are a bunch of things that I did complete during the "challenge"...

  • Arduino Leonardo based firmware with simple direct connection to a single D9 male connector
  • Two versions of the hardware, one quick and dirty, the other optimized for the parts I had.
  • Designed to use minimal external parts - just the Arduino board and a D9.
  • Serial interface shell to configure which device it is
    • Amiga Mouse (fully tested)
    • Atari ST Mouse (fully tested)
    • Atari Digital Joystick (fully tested)
  • Serial interface to select which output the joystick provides
    • Mouse movements
    • WASD keypress input
    • Arrow Key keypress input
    • HJKL keypress input
    • etc.  (support for MAME, Stella, Vice, etc)
  • "Explorer" to experiment with input device auto detection algorithm (which does work)
  • Amiga 500 keyboard input header (incomplete)
  • Amiga 500 to Amiga 1000 keyboard adapter (to RJ-22 4P4C telephone handset jack)
  • Documented Amiga keyboard adaption 
  • Documented Amiga - Atari ST mouse differences
  • Documented other D9 joystick pinouts (and how they relate, etc)

There are two features that I did not complete before the end of the month...

First of all, I was unable to get the keyboard support working before the end of the month. I was having a hard time with it only to realize it was a power issue.  The keyboard was consuming more power than my widget could provide.  It will require a secondary power supply to give enough oomph to get it working.  I also was unable to read from it once I hacked in some power.

Secondly, I had designed an algorithm to autodetect between the three different supported input devices, but I was not able to integrate the code in before the end of the month.  At some point I'll mix it in, and it will switch the kind of device it will be based on analysis of the signals (and signal pairs) of data coming in when it detects "motion".

Next Steps

At this point, I'd like to take the codebase as it exists now, and change the program flow to do the auto-detection of the device type, and then do the "appropriate" thing with it.  "out of the box" it will just "do the right thing" when devices are plugged in. Namely:

  • Amiga mouse becomes USB HID Mouse
  • Atari ST mouse becomes USB HID Mouse
  • Atari Digital Joystick gets configured to send STELLA keypresses (arrow keys, etc)
I will implement this at some point, perhaps during the next Retro Challenge.

Animatronic Avian: Sizing up a skull

I was realizing for a while that I could easily determine the size of the bird I need to make for the "animatronic avian" project.  There are photos of José the Macaw, alongside of a "reference human".  This reference human is a known 5' 10" tall.  Let's call him "Uncle Walt".

Based on a few photos, and general human proportions, we can estimate heights of various unknowns here... (These are all estimations so I'm sure they're off by a little bit, but that's ok for this project.)

Uncle walt is 5'10" tall, or 70".  The average human being is 7.5-8 heads tall.  Therefore, his head is approximately 8 3/4" tall.  Yes. Walt Disney's head was 8 3/4" tall.

I found an image with Walt and José the macaw, where Walt's head is 100 pixels tall.  To be fair, it could have been the "barker bird" rather than José. Anyway, in the same image, José is 135 pixels tall.  Some simple fractional math from here (which I won't do here since I don't want to spend 30 minutes figuring out how get Blogger to display math stuff) yields that the bird is 11.8" tall from bottom of feet to top of head.  Since this is all estimations, I would say that the bird is between 11 3/4" - 12" tall with feathers and fuzz and such.

Now that I have the proportions, and the sizing for this documented, I can proceed to learning how to use the laser cutter at Interlock and design an internal structure a la boat ribs and stringers.  I made a boat using this technique back in high school out of balsa wood and MonoKote that worked out well. This time, i'll use some 1/8" wood of some kind instead.  I also plan on doing 3d printing for the beak, at least for a form to use for vacuum forming, or perhaps as-is.  I haven't figure that all out yet.