Wednesday, July 24, 2013

July 25 Working inside Haiku LMS

Currently working inside the course in Haiku LMS to verify and document the install for devices the course will support.  Want installs to be smooth and hopefully fast. Here is a screen shot of Devices overview page.

CBCv2 is expected to be the first device fully supported and documented in the course.


Friday, July 5, 2013

July 5 LMS Flashing and drivers

Normally when NXT acts odd, reflash firmware and all is fine. But what can be done with the device not recognized and comes up as Unknown Device / faulty device? This post document the symptons and a simple solution that worked.

I use my NXT with various software and firmware for teaching children NXT Mindstorms (waterbotics) and Lejos, Enchanting, a Scratch like puzzle language, as well as ecos with Forte for this project to teach industrial automation.

Last week my NXT got confused and would not let programs to be downloaded. Finally decided to reflash the firmware.

NXT Mindstorms software normally recognizes an NXT even if other firmware is loaded or in reset mode. It didn't.

Device driver listed as Unknown device, even on my laptop with Atmel driver and SAM-BA.

Tested my set-up with another NXT and the driver showed up, both for Lego and in reset mode.

Somehow connecting a working NXT, fixed the general driver problem. Afterwards the faulty NXT was recognized as a known device, so flashing was easy. In this case the Mindstorms firmware renamed from .rfx to .bin, since was on my development laptop, but its summer workshop time. 

Back to LMS forte next week.


Wednesday, June 26, 2013

June 26 Multiple constructions with 1 NXT

What if a student wants to do have stations, but only has 1 NXT? For example where 1 robot does something and another to delivers or picks-up the material or product.

Background: The IEC 61499 tutorial assumes users have access to popular Lego NXT set. Some may be able to work in teams using multiple NXT sets together or with another device (RaspberryPi or CBCv2) so -between communication between devices can be used. 

But what if alone with just 1 NXT?
So here are suggestions for mini-robots to get the most out of 1 NXT set.

For example a windmill that grinds grain.  The Stomper alone could be used to create a Press example. Sensors are not included here, but can easily be added to control via sensor state.

Additionally a 1 motor robot (forwards/backwards only) to deliver or pick-up a product. Note the cable can interfere with how well the car goes straight forward and back to the same place.
This windmill is a combination Clinton Blackmore's Windmill and Stomper constructions.

Mini-car should be able to be constructed just from these pictures.
1 Motor Mini-Robot Car
Mini-Robot Car parts
See simple Building Ideas by Clinton Blackmore for these and other simple constructions to build on.

Saturday, June 15, 2013

June 15 RPi as BrickPi

Let's combine using Lego Mindstorms (LMS) and Raspberry Pi for hardware option for running IEC61499.

See this Kickstarter campaign for the BrickPi!   which is 60x over its goal. Still 1 day to go.

There are also instructions online to build your own BrickPi via open Hardware (links on right)
Judging from the backing this will be popular very quick.

For the tutorial it would allow those already with popular Lego Mindstorms and low-price popular Raspberry Pi and low cost BrickPi board use.

Best to use another board to run motors with RPi, so why not BrickPi and use Lego NXT motors and also get use of the Lego sensors.

Side Note: CBCv2 has been supported in release version of 4DIAC since Sept. 2012.
The CBC motors and sensors if available also work well with RPi !


Sunday, June 9, 2013

June 6 ARM7 compilers

[Back to LMS=Lego(TM) Mindstorms (TM) NXT with ARM7 inside]

We have been and currently are still using the GNU ARM toolchain with OpenOCD. (see other posts)
For a long time we have looked at other compilers to see if it would help make the FORTE footprint smaller. Especially looking for a way to try using thumb instructions.  Various tries did not work. ARM GNU looks like they have a now have t-arm-elf version.

This post will be used to document what we find out.

For a start a link collection:




Tuesday, May 28, 2013

May 28 Loopback adapter now


Using loopback adapter fixed some firewall issues in the past so install loopback adapter and will see if helps with RPi firewall issues.

Setting up loop back device with Windows 7...
Similar but slightly different to: Mar.15 Setting uploop back device post
  • Open Device Manager 
  • Right click on computer name
  • chose add legacy hardware
  • Next
  • Chose add manually
  • Chose Network adapters
  • Chose Microsoft and Loopback adapter

Tuesday, April 30, 2013

Apr. RPi+forte

A first apps using RPi work using wiringPi interface with forte.
This should help Arduino community get onboard faster.

Update (again): wiringPi is under LGPL . 4DIAC under EPL. Told "as long as you only link against an dynamic library (.so) and don't copy their code (i.e., only use their headers) it should be ok."

Picture will be added... doing more testing and working on course. Video in next post.
[Using breadboard with 220 Ohm resistors and 8 LEDs, usually red]


System model
Note: IP address is LAN IP address of the device.


Tired of blinky... here is an app to test LED on various RPi Pins:



Thursday, April 4, 2013

Apr.4 4DIAC Communication

The 4DIAC-IDE downloads the FBs to the device to start the application.
However Java does run will on RPi so downloading from Laptop using Publish/Subscribe.
First  simple test is X+3 TestApplication distributed with 4DIAC via the workspace.

[NEXT: DIO (digital input/output) SIFB for RPi]

X+3 TestApplication 

Distributed with 4DIAC via the workspace
2 Devices: 
PC for VISualisation; 
MICROCONTROLLER to do the CALCulation remotely.
  1. Laptop displays Input / Output in frame via FBDK
  2. Request published to RPi Subscribe
  3. RPI will do the calculation of X+3
  4. Result published to Laptop Subscribe
  5. Laptop displays result

ApplicationTest as-is assumes the same computer is used for both devices.
Want two physically different devices on a LAN: Laptop and RaspberryPi
System Configuration with Devices
[Update: using 224.x.x.x IP address was needed due firewall restrictions, 
regular LAN device IP address will normally work fine.] Broadcast IP address 224.0.1.1: worked for both Publish and Subscribe to RPi.
IP address use must be included in class.  (typo for MICROCONTROLLER corrected 4/5 2:30PM in Vienna)
Test Results with various Publish/Subscribe Broadcast IP addresses




Multicast References: 

Mar.27+ RPi LED SIFB

Update 4/4/12 

  • wiringPi code example for a blinky works.
  • Code used in a DIO (Digital Input/Output) SIFB compiles.
    • Publish/Subscribe problem currently. See next Post for details.
  • Neil Higgins got a Blinky from forte working! 
    • See 4DIAC / FORTE on Rasperry Pi in 4DIAC Open Discussion
    • Our set-ups are different, so both will be instructional.
      • not using wiringPi,
      • uses Gertboard
Mar.27+ Notes

  • RPi Cross compile - hello world
    • dev environment and cross-compiler install
    • Eclipse properities set-up 
      • See notes at bottom of post
    • communication set-up for testing (TODO)
  • Blinking an LED with C
    • Install of WiringPi (includes git-core)
      • Install and build on RPi
      • Install only on cross-compile computer
        • Need for includes for compiles
        • Copy the installed wiringPi from RPi to cross-compile computer (TODO)
Notes:
Blinking an LED with C - cross compile with wiringPi
http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/
see Stephan questions and answers


RPi Cross-compilearm-linux-gnueabihf-g++

Development Environment for the Raspberry Pi using a Cross Compiling Toolchain and Eclipse Posted on September 28, 2012 by halherta

For Eclipse properties C/C++ General -> Paths and Symbols set-up I found it useful (for copy/paste) to list the files needed :
Includes
$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-gnueabihf-raspbian/
1 arm-linux-guneabihf/include
2 arm-linux-guneabihf/libc/usr/include
3 lib/arm-linux-guneabihf/4.7.2/include-fixed
4 lib/arm-linux-guneabihf/4.7.2/include
5 lib/arm-linux-guneabihf/4.7.2/finclude


Library paths
$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-gnueabihf-raspbian/
1 arm-linux-guneabihf/lib
2 arm-linux-guneabihf/libc/lib
3 arm-linux-guneabihf/libc/lib/arm-linux-guneabihf
4 lib/gcc/arm-linux-guneabihf/4.7.2
5 libexec/gcc/arm-linux-guneabihf/4.7.2


Wednesday, March 20, 2013

Mar.18-20 RPi + 4DIAC proof of concept

My first 4DIAC RPi tests 

At least 3 others have used RPi with forte already. See forums. I had it easier. Now the Raspian packages are very current.  Traveling next week and have to get my own breadboard and couple other things. But can have software and apps ready to go. No RPi FBs in 4DIAC, but the FB interface for some would be similar to Lego Mindstorms (LMS) and CBC v2 FBs.  

Also I hope to use CBCv2 sensors and small motors with RPi.

Compiled 4diac on RPi. Needed to install more software that were current and instated the first time. Minor problem in 4DIAC development encouraged me to move from default tip to 1.3.1 

Tested using a cross-compiler with Eclipse under Ubuntu.

So far everything seems very straight forward with the RPi
All parts for a proof concept work as 4diac on posix is expected to.

Link collection: [some good, some random]

Control LED by GPIO  on RPi 

Monday, March 18, 2013

Mar.14-16 RPi moving along

Preliminary information found and tested. 
Next step is with 4DIAC. [next post Wed or Fri]

First RPi boot (Mar.14)
Hardest part was to get all the connectors.
Took less than 30 minutes after had everything.
  • Power supply 1.2A / 5V
    • Model B instructions says 700mA to 1200mA
      • 700mA what chip needs as minimum; may include keyboard and mouse.
      • 1200mA so board does not get too hot.
    • with micro USB connector 
      • [Mobile phone charges can be used if have around 1000mA or more]
  • HDMI to DVI-D connector  (to display)
    • Select B for digital output
  • Keyboard and mouse
  • Recommend Ethernet cable 
    • No network to plug Ethernet into in lab (due to firewalls)
    • Used wireless with mobile phone
First boot worked as documented. 

Commands to remember:

  • sudo raspi-config to if forgot anything, like turn on ssh.
  • startx  to  graphic interface

Second RPi "configuration" addition and Blinky (Mar.16)

  • LapTop and RPi connected to Mobile phone as router
  • RPi wifi via LinkSys WiFi USB stick
  • wifi via DLink USB with Mobile phone
    • see book True WiPi 
      • using wpa_gui
        • Add and connect to mobile phone
      • LinkSys WiFi USB stick
      • no USB port extender so plugged in/out keyboard and mouse
        • obviously not good idea long-term
    • connect using Putty to text screen
  • SSH 
    • turned on for RPi via raspi-config
      • but setting not kept (how)
    • use PuTty for laptop
    • WPA2 choices
      • WPA (TKIP) on mobile phone, but WPA personal on RPI
      • AES-based CCMP:  WPA2(AES) on mobile phone and WPA2 CCMP on RPi
    • Minor problem: At first the Kindle was on and connected to mobile phone taking 2nd of the 2 connections allowed.
    1st RPi test : Turn LED on (Mar.16)
    just connect ground pin and 3.3V source pin or 5V source pin (brighter)
    2nd RPi test : Control LED by GPIO (Mar.16)
    On to C++ and 4DIAC now...

    Wednesday, March 6, 2013

    Mar.3 RaspberryPi start-up for course

    Quick Set-up Need
    RaspberryPi cannot be used straight of the box, because the box only has the 1 small board of the computer. It was designed for using in Computer Science education, so the set-up is a part of this education.  Being low-cost and many have it fits our criteria for use in the course. 

    However so our focus stays on the IEC 61499 / 4DIAC course, a quick guide to set-up HW for RaspberryPi projects that map to the lessons is needed.  [This Post will be updated.]

    This blog entry will be collection of how-to links used to get going with RaspberryPi: generally; with HW needed for lessons; and to use with 4DIAC. With additional text the better links will go into the course.

    Generally
    HW needed for lessons
    • LED
    • Light sensor
    • motor  (Gertboard needed)

    Wednesday, February 27, 2013

    Feb.27 Course has new prototype

    LMS
    Not open yet, but Haiku learning system free version is home of latest version of the course.



    Haiku has proven to be very easy to use in my part-time job and its always improving.

    Lessons topics will be posted here soon.

    Much has been learned from better Coursea courses, Udacity videos, and Haiku LMS.

    More devices:
    Lego Mindstorms NXT (eCos) will stay the main device, the lessons should allow for Posix devices like:
    • CBC v2 (in 4DIAC since 9/2012)
    • Raspberry PI (4DIAC users)
    • (hopefully) Lego EV2 since it will have an O/S

    Thursday, January 3, 2013

    Jan.3 MOOCs and LMSs

    As this project gets more to class part, this blog will become education than hardware/software oriented.  

    There is a major trend toward MOOCs (Massive Open Online Courses). Many people from all over the world sign up for a free online course on an interesting, current topic or that uses a current tool.  A certificate is usually offerred the few who complet the course. Most students will end-up auditing the class. 

    But like most classes, the teacher of a MOOC and how well the student know what to expect each week/unit (to plan), determines who completes the course. Easy to disappear from MOOC. 

    But it is a way to help Life Long Learning without going back to school. The a MOOC has unique challenges. How to grade... robot grader or peer grading using a rubric.  Usual elearning challenges... engagement. Short videos help. But when the some questions and answered in a video, you feel like the prof is really there for the class.

    So far Coursera is my favorite. The LMS is flexible enough to help prof respond to pattern needs. To help avoid drop-outs one class used only top x grades and other allowed a certain number late days to be used as needed. Peer grading was new and is a good as the rubric instructions. 

    Venturelab wanted us to work in online team - super idea, but started telling us to just get to know each other and look for a team to join. I felt dumped in. No Onboarding.  The course improved as it went on.

    Udacity course I am signed up for are finished, but due to robot graders are still offered for independent study. They have are sooo many small step (short video, quiz, repeat) Keeps me engaged, but also want a break too. Of course I did the 1 unit in 1-2 days. So might be different if have a week.

    What I don't like is none of the LMSs used are available to "outsiders" to try.

    ----
    Next:
     Look at LMSs layouts vs Moodle default list layout 
     Look at / try Code Academy... another LMS or something slightly different. ----
    Some related links on trends:
    top-ed-tech-trends-2012-moocs
    gamification in classroom
    how-long-does-it-take-to-create-learning