Category Archives: Uncategorized

Run MIT App Inventor offline on a Windows 10 machine

Want to teach children how to develop Android apps using MIT App Inventor? Have problems with an unstable or missing Internet connection? Use a local installation of MIT App Inventor on your Windows PC. Here's how:

VirtualBox

Download VirtualBox from https://www.virtualbox.org/wiki/Downloads

Install.

Download App Inventor Appliance

Go to

https://frc-events.firstinspires.org/FTCImages/2016

. They host a preconfigure virtual machine that runs an offline MIT App Inventor server. It contains some additional FTC stuff, but you can ignore that if you want. Download the Local App Inventor applicance file for Windows.

Setup Appliance

Start VirtualBox. In the menu, go to File / Import Appliance... .  Select 2016-08-20 11_17_52-LocalAppInventor - Settingsthe appliance file you downloaded from FTC. After it is imported, select the new virtual machine 'LocalAppInventor', go to settings and select Network.  Make sure Adapter 1 is enabled and set to 'Attached to: NAT'. Go to Advanced' / Port Forwarding and set up a new rule with Protocol: TCP, Host Port: 8888, Guest Port: 8888.2016-08-20 11_18_25-Port Forwarding Rules

Launch Virtual Machine

In Virtual Box click on Start. After a few minutes everything should be running. Check that the screen shows a running App Inventor after some time.

Share your WiFi connection

Enable a WiFi hotspot on your Laptop to allow the children to connect their laptops to yours. You can follow the instructions from windowscentral.com.

 

HP8500A Paper Jam Mystery

This weekend I tried to repair a Hewlett Packard 8500A printer, 2 month after the 2 years guarantee was over. The display showed "Paper jam" error messages each time the printer was booted, which was a false error.

As it turned out, the problem was a broken cog, as can be found very often in your prefered search engine.

There are other images and videos online, e.g.

or

These are the images of my broken HP8500A after removal of the black plastic housing around the broken white cog:

Overview 1:

2014-04-13 20.57.53

Come closer to the broken cog:

2014-04-13 20.58.12

 

 

The removed plastic housing:

2014-04-13 20.59.09

And here we have the broken cog:

2014-04-13 21.00.30

 

I tried to glue the cog, but with no success. It seems the printer cannot be fixed.

Dump ATMEGA32 on AVR-NET board using avrdude

Using the ArduinoISP program on the Arduino (actually I used the Diavolino) one can dump the flash memory of the ATMEGA32 on the AVR-NET-IO from Pollin like this:

  1. Program ArduinoISP to your Arduino
  2. Wire up like this:pollin_avrnetio
  3. Open CMD. Go to your avrdude directory within the Arduino IDE and execute avrdude. Maybe you have to adapt the -P parameter to the serial port you are using to connect to Arduino.
cd "C:\Program Files (x86)\Arduino\hardware\tools\avr"
bin\avrdude -C etc\avrdude.conf  -c avrisp  -p ATMEGA32 -P com4 -b 19200 -U flash:r:C:\TEMP\flash_v103_pollin.bin:r

Your output look like this:

C:\Program Files (x86)\Arduino\hardware\tools\avr>bin\avrdude -C etc\avrdude.conf  -c avrisp  -p ATMEGA32 -P com4 -b 19200 -U flash:r:C:\docs\AVR-NET\flash_v103_pollin.bin:r

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.10s

avrdude: Device signature = 0x1e9502
avrdude: current erase-rewrite cycle count is -1062731548 (if being tracked)
avrdude: reading flash memory:

Reading | ################################################## | 100% 27.89s

avrdude: writing output file "C:\docs\AVR-NET\flash_v103_pollin.bin"

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

The md5sum of the dumped flash memory image is

$ md5sum flash_v103_pollin.bin
4d040732d01c6aa88ec2dad4ddf56dea *flash_v103_pollin.bin

Using Atmel Studio 6.1 for Arduino development

When you have enough of the "all very easy and basic" Arduino IDE you can switch to Atmel Studio and have much better IDE and editor for your Arduino projects. The following is based on this post by EngBlaze.com

Install Arduino from http://arduino.cc/

  • Install e.g. in C:\Program Files (x86)\Arduino

Install Atmel Studio 6.1 from http://www.atmel.com/microsite/atmel_studio6/ (free registration required)

Start Arduino

  • File / Preferences / Show verbose output during: [ ✓ ] compilation
  • Ensure correct board is set in Tools / Board. I've selected Arduino Duemilanove w/ ATmega328 for the Diavolino Arduino clone
  • Compile any example program, e.g. from File / Examples / 01. Basics / Blink
  • In output  log, look for the name of the path where the core library was generated, e.g.C:\Users\{YOUR_USERNAME}\AppData\Local\Temp\build4980286967124578172.tmp\core.a
  • Generate a new directory and copy the core.a file to this directory with the new name libcore.a, e.g. copy C:\Users\{YOUR_USERNAME}\AppData\Local\Temp\build4980286967124578172.tmp\core.a C:\docs\Arduino\arduinocore_105\libcore.a
  • Close Arduino

Start Atmel Studio

Change your project settings (Alt + F7)

The following steps should be done for Debug and Release configuration separately: Once for Debug, once for Release. Changing Debug and Release at the same time using All Configurations led to strange error message boxes when saving the configuration.

AVR/GNU C++ Compiler / Symbols

F_CPU=16000000L
ARDUINO=101

AVR/GNU C++ Compiler / Directories

C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino
C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard

AVR/GNU C++ Compiler / Optimization

Optimization Level: Optimize for size (-Os)
Other optimization flags: -fdata-sections

AVR/GNU C++ Compiler / Miscellaneous

Other flags:-fno-exceptions

AVR/GNU Linker / Libraries

Libraries / Add item: core
Library search path: C:\docs\Arduino\arduinocore_105

AVR/GNU Linker / Optimization

Garbage collect unused sections [ ✓ ]

Create an external tool

In Tools / External tools...   create an external tool to send a compiled program to the chip:

  • Command: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe
  • Arguments:-C"C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega328p -carduino -P\\.\COM4 -b57600 -D -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i
  • [ ✓ ] Use output window

converting Mythbuntu to Ubuntu

In the Mythbuntu Control Center you can switch to Ubuntu at any time. When I wanted to convert Mythbuntu to Ubuntu (because using XBMC now instead of MythTV) I encountered the following error message:

Fehl http://de.archive.ubuntu.com/ubuntu/ maverick-updates/main samba i386 2:3.5.4~dfsg-1ubuntu8.2
404 Not Found [IP: 141.76.2.134 80]
Fehl http://de.archive.ubuntu.com/ubuntu/ maverick-updates/main winbind i386 2:3.5.4~dfsg-1ubuntu8.2
404 Not Found [IP: 141.76.2.134 80]
Fehl http://de.archive.ubuntu.com/ubuntu/ maverick-updates/main smbclient i386 2:3.5.4~dfsg-1ubuntu8.2
404 Not Found [IP: 141.76.2.134 80]
Fehlschlag beim Holen von http://de.archive.ubuntu.com/ubuntu/pool/main/s/samba/samba_3.5.4~dfsg-1ubuntu8.2_i386.deb 404 Not Found [IP: 141.76.2.134 80]
Fehlschlag beim Holen von http://de.archive.ubuntu.com/ubuntu/pool/main/s/samba/winbind_3.5.4~dfsg-1ubuntu8.2_i386.deb 404 Not Found [IP: 141.76.2.134 80]
Fehlschlag beim Holen von http://de.archive.ubuntu.com/ubuntu/pool/main/s/samba/smbclient_3.5.4~dfsg-1ubuntu8.2_i386.deb 404 Not Found [IP: 141.76.2.134 80]
E: Einige Archive konnten nicht heruntergeladen werden; vielleicht »apt-get update« ausführen oder mit »--fix-missing« probieren?

The solution is indeed - before converting to Ubuntu - execute

sudo apt-get update

in the command line