Search found 35 matches

by pmulvey
Tue Mar 31, 2020 8:33 pm
Forum: General Discussion and Questions
Topic: memory allocation error
Replies: 3
Views: 101

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: 18
Views: 1215

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: 969

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_...
by pmulvey
Tue Mar 24, 2020 9:44 pm
Forum: General Discussion and Questions
Topic: My IDE configuration using Notepad++, ampy and Tera Term
Replies: 18
Views: 1215

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

I get bouts of ampy complaining that it cannot enter raw REPL on the ESP8266. I say bouts because sometimes it's fine but after a while it starts to act up. I tried out the ESP32 and the problem became almost constant. I delved into the ampy module "pyboard.py" and noticed that the code made just on...
by pmulvey
Thu Feb 27, 2020 11:39 pm
Forum: General Discussion and Questions
Topic: My IDE configuration using Notepad++, ampy and Tera Term
Replies: 18
Views: 1215

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

I have since found that on some PCs (old ones) that my python script for sending keystrokes to TeraTerm was unreliable. After some experimentation I added a sleep(.2) just before the line that sends the keystrokes and this seems to resolve the issue. Having thought that Thonny was going do all of th...
by pmulvey
Wed Jan 29, 2020 10:19 am
Forum: General Discussion and Questions
Topic: My IDE configuration using Notepad++, ampy and Tera Term
Replies: 18
Views: 1215

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

Just discovered, Thonny 3.2.7 does all of the above!
by pmulvey
Thu Dec 12, 2019 10:45 pm
Forum: General Discussion and Questions
Topic: My IDE configuration using Notepad++, ampy and Tera Term
Replies: 18
Views: 1215

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

Ignore my previous posts... this is a work in progress! When I am using Tera Term to view serial output I had to close the connection before downloading and then open it again because ampy needs the port. In order to improve the automation around programming the device I have added two python progr...
by pmulvey
Mon Nov 04, 2019 5:15 pm
Forum: ESP8266 boards
Topic: UART and REPL Issue
Replies: 6
Views: 779

Re: UART and REPL Issue

I have an arduino connected to the esp8266 via I2C. I have a simple command processor running on the arduino. I am sending commands to it and getting responses. The mp3 module is connected to the arduino and I am sending requests from the esp8266 to play clips specifying the track and folder number....
by pmulvey
Sun Nov 03, 2019 2:51 pm
Forum: General Discussion and Questions
Topic: [SOLVED] "Strange" behaviour reading I2C device
Replies: 1
Views: 384

[SOLVED] "Strange" behaviour reading I2C device

I was reading the I2C PCF8574 i/o expander and branching depending on results. This is a re-creation of the situation: from machine import I2C while True: i2c = I2C(scl=Pin(5), sda=Pin(4), freq=400000) x = i2c.readfrom(0x20, 1) #i2c returns 0x10 print ("First attempt: x = ", x, "and is type", type(x...