interface_and_application_programming


assignment:
  • write an application that interfaces with an input and/or output device that you made, comparing as many tool options as possible.

  • This was another week where I was started out a little unsure about what to do. For my final project I would like to be able to locate the position of my robot relative to the 'anchors', but I wasn't sure where to start.

    I realised we could use a plugin for grasshopper called Firefly (v1.0.0.70). I have been wanting to use this plugin for a while and this was a good opportunity to learn. I started off by following this tutorial. This involved setting up a servo to be controlled via a servo all aka arduino --> grasshopper --> arduino. This showed not just how simple this new tool can be, but also how powerful.

    There was an error in the code for arduino that I loaded (writetoDAX error). This can be fixed by going here.

    As I had been using a joystick in my projects I decided to see if I could use this to control a point on the screen in Rhino. We had a lecture on the power of Unity - used for making games - and this inspired me to make a maze game out of the program. A few anenome loops and a touch of python coding later I had my game.

    The python code can be found in the relevant component in the grasshopper file. A good resource for using Python in Rhino is this page where a list of all the commands are and examples on how to use them.

    If anyone is good with coding in grasshopper please see this Grasshopper thread.
    EDIT : I found a bug in the code.

    The arduino is simple to setup. Just connect a joystick as in the image below and then hook the uno up to your computer as you would normally with the USB. This will provide power and also the joystick position information.

    hello_01


    Download the files for this week here