chipKIT® Development Platform

Inspired by Arduino™

Fubarino Mini

Created Mon, 16 Dec 2013 00:59:57 +0000 by helpme


helpme

Mon, 16 Dec 2013 00:59:57 +0000

Greetings,

I just obtained the Fubarino Mini and I am trying to get the simple blinking sketch from the Fubarino web site to work.
[url]https://github.com/fubarino/fubarino.github.com/wiki/Code-Examples[/url] Use the on board button and LED Once the sketch finishes downloading the LED flashes quicker a few times and then goes off. I made a couple of modifications to the example code to prove to myself that it is downloading and running.

// This sketch demonstrates how to blink the on-board LED
// and read the on-board button. When you run the sketch,
// The LED will blink slowly until you hold down the PRG
// button. Then it will blink fast.

// Controls the LED blink speed, in ms
int LedSpeed = 1000;

void setup()
{
  **Serial.begin(9600);**
  // Set up our two pins of interest
  digitalWrite(PIN_LED1, LOW);
  pinMode(PIN_LED1, OUTPUT);
  pinMode(PIN_BTN1, INPUT);
}

void loop()
{
  
  **//Serial.begin(9600);**
  digitalWrite(PIN_LED1, HIGH);
  delay(LedSpeed);
  
  digitalWrite(PIN_LED1, LOW);
  delay(LedSpeed);
  if (digitalRead(PIN_BTN1) == 1) {
     LedSpeed = 1000;
     **Serial.print(PIN_BTN1);
     Serial.println("Down");**
     }
  else{
    LedSpeed = 50;
    **Serial.print(PIN_BTN1);
    Serial.println("Up");**
    }
}

After starting up the Serial Monitor and clicking Send, the sketch repeatedly prints 1Up. Pressing the PRG button on the Fubarino Mini board does not seem to effect the sketch, albeit using the PRG and Reset buttons as documented to download another sketch works as expected.

Any insights as to what might be wrong would be greatly appreciated.

Thanks,

Fred


EmbeddedMan

Mon, 16 Dec 2013 17:52:04 +0000

Fred,

Which version of MPIDE are you using?

*Brian


helpme

Mon, 16 Dec 2013 19:16:52 +0000

Greetings Brian,

The version I am using is from url: [url]http://bit.ly/getmpide[/url] mpide-0023-linux32-20121013-test.tgz — mpide-0023-linux32-20121013-newlib build 0x01000304

I found this URL in the FubarinoMiniUserRefManual.pdf from the [url]https://github.com/fubarino/fubarino.github.com/wiki[/url] from the [url]http://fubarino.org/mini/index.html[/url]

I vaguely remember that the Program With MPIDE pointed to this github site when I started but today it appears to point to [url]http://bit.ly/downloadmpide[/url] Should I be using one of the MPIDE(s) from this site?

Thanks,

Fred


ricklon

Tue, 17 Dec 2013 04:39:49 +0000

Thanks for posting. I'll update the bit.ly link to point to the newer area.

The latest linux32 build is: http://chipkit.s3.amazonaws.com/builds/mpide-0023-linux32-201311118-test.tgz

In that older version there could be a variant file bug. That has since been fixed.

--Rick


helpme

Wed, 18 Dec 2013 15:03:51 +0000

Thanks Rick,

That worked great.

The only issue is that this distribution is missing the lib/librxtxSerial.so file, which seems to be required, albeit, it does have the lib/librxtxSerial64.so file. I have had to fix this on all the (mp)ide releases that I have used.

Bonus questions:

  1. how can I increase the font size on the status window on the bottom of the mpide tool. I could not find a preferences.txt entry that controls this.
  2. How to correlate the line number in an error message with either the source or the number in the lower left corner of the tool? They tend to be different.
  3. When downloading the sketch the RXTX tries to lock /var/lock/LCK..ttyUSB0 and fails. The failure is understandable as this device is being used by something else (another unrelated mpide).

Thanks,

Fred


majenko

Wed, 18 Dec 2013 15:21:40 +0000

Thanks Rick, That worked great.
The only issue is that this distribution is missing the lib/librxtxSerial.so file, which seems to be required, albeit, it does have the lib/librxtxSerial64.so file. I have had to fix this on all the (mp)ide releases that I have used. Bonus questions:

  1. how can I increase the font size on the status window on the bottom of the mpide tool. I could not find a preferences.txt entry that controls this.
  2. How to correlate the line number in an error message with either the source or the number in the lower left corner of the tool? They tend to be different.
  3. When downloading the sketch the RXTX tries to lock /var/lock/LCK..ttyUSB0 and fails. The failure is understandable as this device is being used by something else (another unrelated mpide). Thanks, Fred

I can answer all three with just one word: UECIDE :)