Go Down

Topic: bbc micro:bit using an arduino ide (Read 379 times) previous topic - next topic

mxkid

Hi all,

I'm trying to use my micro:bit with the Arduino IDE. So far - I have the IDE having the micro:bit installed in tools. I plug the device in and it comes in at COM17 (note - it doesn't say anything after it). Softdevice set to "S110". Programmer is "CMSIS-DAP" (I've tried several with the same outcome). I compile some software ok. I then flash the software (it's going somewhere - the led on the device flashes as it goes in). However, it's not successful - I get the errors:


c:/users/jones/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes

c:/users/jones/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes

c:/users/jones/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes

c:/users/jones/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes

c:/users/jones/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .heap by 4 bytes

c:/users/jones/appdata/local/arduino15/packages/sandeepmistry/tools/gcc-arm-none-eabi/5_2-2015q4/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .stack_dummy by 4 bytes

Sketch uses 2772 bytes (1%) of program storage space. Maximum is 151552 bytes.
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
swd
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
nrf51.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0x00018e20 msp: 0x20004000
** Programming Started **
auto erase enabled
wrote 3072 bytes from file C:\Users\Jones\AppData\Local\Temp\arduino_build_255929/sketch_jun11b.ino.hex in 0.499201s (6.010 KiB/s)
** Programming Finished **
** Verify Started **
verified 2892 bytes in 0.140401s (20.115 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked


And nothing is working. I'd really appreciate some help on this  :)

mxkid

Sorry - I should mention - I do use NANO's for projects as well as MEGA's. It's just my son has one and I'd like to use a familiar interface  :)

pert

However, it's not successful
What do you mean by "it's not successful"? Does the Arduino IDE tell you the upload failed?

I get the errors:
You need to understand the difference between warnings and errors. A warning is the compiler telling you there is something in the code that could possibly cause a problem but doesn't cause the compilation to fail. An error is a problem with the code that causes compilation to fail. In this case you have posted warnings, not errors.

gbafamily


mxkid

Hi all,

Thank you for the replies. After looking - you are quite correct - they are just warnings. I don't see why my code won't work. I took it from the tutorial from adafruit:

const int buttonA = 5;
const int buttonB = 11;
 
void setup()

  Serial.begin(9600);
  pinMode(buttonA, INPUT); 
  pinMode(buttonB, INPUT);   
}
 
void loop()
{
  if (! digitalRead(buttonA))
  {
    Serial.println("Button A pressed");
  }
  if (! digitalRead(buttonB))
  {
    Serial.println("Button B pressed");
  }
  delay(150);
}

Any ideas?

Cheers!

pert

Please describe exactly what you mean by "won't work".

Please provide a link to the Adafruit tutorial you're following.

Do you have your buttons wired correctly? You need pull-up resistors on the buttons for that code to work.

mxkid

Hi all,

Thanks for your responses. The link I was using was:

https://learn.adafruit.com/use-micro-bit-with-arduino/overview


And the board is pre-assembled so no additional components are required.

I now have it working. I 'assumed' that there was a 'Softdevice' already installed on the micro:bit as it's been working with the actual micro:bit software. However, it looks like there wasn't.  :smiley-confuse: I installed that and it's all working just fine.

So the tutorial is perfect - purely user error. Sorry about that. Note for the future - follow ALL steps and assume NOTHING  :)

Thanks again!



Go Up