Search found 42 matches

by pmulvey
Sat Jul 04, 2020 7:21 pm
Forum: General Discussion and Questions
Topic: import issue
Replies: 1
Views: 44

import issue

I have a module that I import after "from machine import I2C". The module code does not recognise the i2c name unless I put this line in the module as well. What's the explanation?
by pmulvey
Sun May 10, 2020 9:14 am
Forum: micro:bit boards
Topic: Radio not working
Replies: 2
Views: 310

Re: Radio not working

Thanks lujo,

I had read about the complex packet issue before and forgot about it! I followed your link and at your advice I used Phil Hall's implementation. All seems good now for transmit and receive packets.
by pmulvey
Sat May 09, 2020 9:33 pm
Forum: micro:bit boards
Topic: Radio not working
Replies: 2
Views: 310

Radio not working

I set up a Master / Slave arrangement using Makecode plus a small bit of Javascript, it works great. I then started to rewrite the Master in Micropython and the Slave receives no signal. I even tried looping through all of the channels but no joy. Before I get into details is there anything blinding...
by pmulvey
Tue May 05, 2020 8:34 am
Forum: micro:bit boards
Topic: Incorporating MyLib.py into the flashed hex file
Replies: 2
Views: 344

Incorporating MyLib.py into the flashed hex file

I want to put together a large MyLib.py. Currently this kills the microbit once it passes a certain size throwing memory allocation and parser errors. It would be great if his library could be flashed and then allow the user to call it for their own smaller programs. I want to use the microbit to te...
by pmulvey
Mon May 04, 2020 9:15 pm
Forum: micro:bit boards
Topic: Memory allocation and parser errors
Replies: 1
Views: 220

Memory allocation and parser errors

Just started micropython on the microbit having spent some time writing code for the Esp8266. With relatively small programs I'm getting memory allocation errors, and errors about the parser unable to handle scripts. Is micropython very limited on this platform compared to the Esp8266?
by pmulvey
Mon May 04, 2020 8:43 am
Forum: micro:bit boards
Topic: LCD driver for micro:bit
Replies: 1
Views: 730

Re: LCD driver for micro:bit

I used your driver but whenever I wrote more that 10 characters on the LCD I got a Memory Allocation error. I tried using .mpy files instead but it appears that the microbit does not recognise these, reporting not found. Eventually I stripped out all of the variable declarations in your code and rep...
by pmulvey
Wed Apr 15, 2020 3:00 pm
Forum: General Discussion and Questions
Topic: My IDE configuration using Notepad++, ampy and Tera Term
Replies: 20
Views: 1940

Re: My IDE configuration using Notepad++, ampy and Tera Term

I downloaded the zipped binary but it will not connect to my ESP8266. Refresh seems to be doing something but nothing appears. I edited the xml file to launch my TeraTerm: <add key="TerminalApp" value="C:\Program Files (x86)\TeraTerm\ttermpro.exe"/> <add key="TerminalAppArgs" value="-serial COM4"/> ...
by pmulvey
Tue Mar 31, 2020 8:33 pm
Forum: General Discussion and Questions
Topic: memory allocation error
Replies: 3
Views: 235

Re: memory allocation error

Similar issue on the Esp8266, this is my (possible) solution:
viewtopic.php?f=2&t=7097&start=10#p45915
by pmulvey
Tue Mar 31, 2020 8:23 am
Forum: General Discussion and Questions
Topic: My IDE configuration using Notepad++, ampy and Tera Term
Replies: 20
Views: 1940

Re: My IDE configuration using Notepad++, ampy and Tera Term

With my code on the ESP8266 getting bigger by the day I was now running into the "memory allocation" errors. Having pulled out all of my hair and exposing skull bone I think that I have a solution. For some reason I have only now discovered the simple way to use mpy_cross [https://pypi.org/project/m...
by pmulvey
Tue Mar 31, 2020 6:44 am
Forum: ESP8266 boards
Topic: Something going on in background??
Replies: 8
Views: 1232

Re: Something going on in background??

Just revisited the strange PWM behaviour. I have modified the code to increment the duty cycle in steps of 3 rather than 1. All smooth now! def RGBRamp(RGBPin): pwm = PWM(Pin(RGBPin)) pwm.freq(1000) for i in range(1022, 1, -3): pwm.duty(i) sleep_us(1000) for i in range(1, 1022,3): pwm.duty(i) sleep_...