Search found 84 matches

by Jim.S
Sun Aug 14, 2016 11:45 am
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

This is what I have just done $ cp main.py /media/MICROBIT/ $ sudo sync $ ls /media/MICROBIT/ AUTO_RST.CFG DETAILS.TXT main.py MICROBIT.HTM $ sudo umount /media/MICROBIT I then manually unplug and replug the USB cable $ ls /media/MICROBIT/ AUTO_RST.CFG DETAILS.TXT MICROBIT.HTM main.py has vanished. ...
by Jim.S
Sat Aug 13, 2016 4:09 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

I tried it with a 3V battery connected during the removal and reconnection of the USB but this made no difference, main.py still vanished.

Seems to mean that the only way to program the microbit is to flash the script using uflash (or mu)
by Jim.S
Sat Aug 13, 2016 6:46 am
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

My microbit doent have a battery pack at present, I wonder if I connected a battery to it it would retain python scripts in memory between connections of the usb? I shall dig out some crokodil clips......
by Jim.S
Fri Aug 12, 2016 7:21 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

I tried the following experiment uflash main.py Flashing Python to: /media/skelton/MICROBIT/micropython.hex <result happy face on microbit> uflash Flashing Python to: /media/skelton/MICROBIT/micropython.hex <result nothing on microbit LED array> cd /media/xxx/MICROBIT/ $ ls AUTO_RST.CFG DETAILS.TXT ...
by Jim.S
Thu Aug 11, 2016 7:50 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

The behaviour of the microbit seems to be VERY different from the pyboard. If I flash the microbit with the only the command "uflash" (i.e without a python script as an option) it flashes micropython.hex to the pyboard. I then copy a the following main.py script to the board from microbit import * d...
by Jim.S
Wed Aug 10, 2016 9:16 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

I understand how to use uFlash to get a REPL or to flash python scripts onto the board, but how can I get a create firmware on the microbit that will run a "main.py" script that is just copied onto the board's memory rather than flashed with uFlash (i.e using the command uflash main.py) Is there a m...
by Jim.S
Tue Aug 09, 2016 7:55 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

Getting there! There are subtle differences between the pyboard and the microbit that make the transition between them confusing. Firmware To flash the firmware on the pyboard you download the latest (from http://micropython.org/download/), put the board into DFU mode (using a hardware jumper) and f...
by Jim.S
Sat Aug 06, 2016 6:40 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

Re: repl on the BBC:Microbit

That's what I have discovered but I cant find a rebuilt microbit firware anywhere I have discovered the following 1. if you go to the "https://www.microbit.co.uk/" you can use the on line editor to create python, compile it to to a .hex file, then drag the file to the MICROBIT directory/folder and i...
by Jim.S
Sat Aug 06, 2016 12:56 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 22015

repl on the BBC:Microbit

I'm a bit confused how to get started with programming the BBC:Microbit in micropython like I would with the pyboard. 1. Do I need to download specific micropythyon firmware before I can get a prompt in the serial terminal? (i.e from screen /dev/ttyACM0) 2. If so, while I have installed yotta on my ...
by Jim.S
Sat Jul 30, 2016 8:10 pm
Forum: MicroPython pyboard
Topic: Exceptions in interrupt handlers
Replies: 2
Views: 4231

Re: Exceptions in interrupt handlers

Thanks, I understand now.. If I declare an instance of MyException outside the ISR it works as intended class MyException(Exception): def __init__(self): pass MyE=MyException() def f(): try: #raise MyException() raise MyE except MyException as e: print('my exception function f') try: import pyb impo...