Sunday, February 14, 2016

Working with Python and Wink robot

Wink Robots - all finally working!
I'm at an interesting place with coding at the moment.  I've been challenged by an Arduino project that I mentioned in my last post - which was to build a wireless sensor that communicates via Xbee zigbee network.  In addition, I have the Wink robot from PlumGeek (thanks to Learning with Lucie )that is coded in the Arduino environment using the same coding language as the Arduino - Python.  On top of those two projects, I enrolled in a Web Design course this year because it's been awhile since I've done some web design work.  We've been doing a lot of PHP which was not something I learned years ago.  Also, HTML5 is now nearly standard, so most of the structure of websites now uses abridged elements and PHP for easy updating and universal design.  I've been challenged with writing PHP arrays.  However, I've seen some good crossover from the for and foreach statements as well as the conditional statements in Python.  I'm feeling "all in" at the moment.  Many projects, lots of coding, lots of reflection.
My desk - littered with fun toys
Fortunately, there are so many great web resources for helping out folks like me who like to stumble around in the dark and figure things out:

PlumGeek and the PlumGeek forums has been really helpful.  I joined the forum and asked for some support and the community quickly responded. 

On an Arduino forum, I found an interesting project similar to mine and emailed the poster.  Within a day a retired man from Florida who authored the post shared some resources and some advice for how to proceed with my Xbee project. 

Lastly, I've been using the web developer toolbar, firebug and W3Schools for learning all kinds of information for web design, including tutorials on PHP.  

Wednesday, February 10, 2016

Open Project Weeks - Wireless Sensor Network - Week One

Xbee Communicators
For the next two weeks, I am really looking forward to working with some of the materials on my desk and the Arduino IDE platform.  Recently I purchased:
  • 4 Xbee wireless communicator notes
  • 2 Arduino uno boards
  • 1 mini usb explorer board
  • 5 breadboards
  • 4 battery packs
  • 1 package of jumper cables
  • 1 book - Building Wireless Sensor Networks by O'Reilly

I am hoping to build in the next week a wireless sensor network to take the internal temperature of a 30 yard mound of woodchips that is being used to heat our greenhouse.  This project, and the parts list above is over a month in process, as I was waiting to get a lot of the materials.  Now I am ready to dig into some coding - Python mostly, to execute the Xbee wireless network.  I'll update here.

For the first project, I am going to set up a simple chat between two communicators using a terminal window and configuring two Xbee's with the same channel.  One communicator will communicate with another communicator.  A good tool for doing this is the XCTU software by Digi.

Saturday, February 6, 2016

Creating and Practicing Code on my iPad

This week as part of my Create with Code course, I spent some time working on my iPad.  I mostly use my ipad for creating and editing movies as an assessment tool with my students.  We video procedural steps for demonstrating all kinds of skills, like steps to properly sear a salmon in the Professional Foods program or showcasing proper safety when handling shop tools in Building Technology.
This week I had the chance to explore some of the creation tools for creating your own game, puzzles, quests and challenges - similar to the different types of games you might find in the App store.  While creating with my personal device, I was reminded of a quote that I pulled from Seymore Papert's book, Mindstorms.  His quote was the following:
"Increasingly, the computers of the very near future will be the private property of individuals, and this will gradually return to the individual the power to determine patterns of education. Education will become more of a private act, and people with good ideas, different ideas, exciting ideas will no longer be faced with a dilemma where they either have to sell their ideas to a conservative bureaucracy or shelve them. They will be able to offer them in an open marketplace directly to consumers. There will be new opportunities for imagination and originality. There might be a renaissance of thinking about education. "
Using Hopscotch, I created a game much like the old arcade classic - Frogger.  You can try my game out yourself (as basic as it is), I called it Turtle Crossing, take a look.  Hopscotch forced me to consider my games goals.  Then, by breaking down the tasks for the individual assets, I created loops for the cars using block programming.  In addition, I had to consider conditional statements for my main character to consider what happens if my game piece collided with a car, or what would happen if the character completed the goal.  Additional buttons for controls had to be configured as well.  It was not as difficult as I thought.  I first had to start thinking in simplest terms, and code the scenarios.

Video of my solution
I also had the chance to play some games as well.  The video above is from one of the levels in CargoBot.  I found these puzzles very challenging.  Using controls and then programming those controls, I programmed the bot to move the boxes.  With limited program space, the game player has to create loops and use visual blocks to create conditional statements.  I had trouble wrapping my head around this.  I could talk out the movements, but really struggled with configuring the correct movements with the limited programming space I was afforded.  If I could spend time with others working on solutions together, I think my learning curve would improve.  This was a game that benefits from more than one competent mind!  As Papert states in the quote above - "there will be new opportunities for imagination and originality" - all on my iPad.