Search found 36 matches

by Frida
Thu May 23, 2019 6:13 pm
Forum: General Discussion and Questions
Topic: utime.ticks_diff() between pycom and upython
Replies: 4
Views: 160

utime.ticks_diff() between pycom and upython

In upython, utime.ticks_diff (new, old) gives positive results. In pycom, utime.ticks_diff (old, new) gives positive results. Old and new have been switched, I wonder why, there is no change in the underlying code. It must be somewhere, between the call and the underlying code. ps. I prefer the pyco...
by Frida
Thu May 23, 2019 5:33 pm
Forum: ESP8266 boards
Topic: How to switch on a electric bulb with ESP8266 board?
Replies: 49
Views: 1283

Re: How to switch on a electric bulb with ESP8266 board?

You have to put "a=pir.value()" inside the while loop.
It has to ask the pin in every loop
by Frida
Thu May 03, 2018 7:14 pm
Forum: General Discussion and Questions
Topic: OSError: [Errno 5] EIO while using I2C
Replies: 4
Views: 1000

Re: OSError: [Errno 5] EIO while using I2C

When it works from the terminal, try a little delay after your writing, so the eeprom has time to write.
by Frida
Mon Jan 22, 2018 6:26 pm
Forum: ESP8266 boards
Topic: Wemos D1 Mini + AM2320
Replies: 18
Views: 8785

Re: Wemos D1 Mini + AM2320

On the picture is the orange wire and scl at one end and sda in the other.
With i2c, scl must be connected to scl and sda connected to sda.
In addition, pullup resistors are missing.
by Frida
Thu Feb 02, 2017 1:56 pm
Forum: ESP8266 boards
Topic: I2C EEPROM on uPy/ESP8266?
Replies: 48
Views: 12288

Re: I2C EEPROM on uPy/ESP8266?

@ warren From the datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/21754M.pdf Page Write Time 5 ms max. Note: The 24XX512 does not generate any Acknowledge bits if an internal programming cycle is in progress. 7.0 ACKNOWLEDGE POLLING Since the device will not acknowledge during a write cycl...
by Frida
Fri Jan 06, 2017 1:06 pm
Forum: ESP8266 boards
Topic: I2C changes to get the HTU21D working.
Replies: 7
Views: 2071

Re: I2C changes to get the HTU21D working.

I haven't looked at it for a long time.
I put the code in: 'machine_i2c.c in /micropython/extmod'
But are you using pullup on SCL and SDA?

And the HTU21D was part of stretch goal, but I don't know of it is implementet yet?
by Frida
Sat Dec 17, 2016 8:26 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 1717

Re: Sonoff: IRQ on push-button

I have changed your pin to pins for wipy1: #pinRelay = machine.Pin(12, machine.Pin.OUT) #pinSchalter = machine.Pin(0, machine.Pin.IN, machine.Pin.PULL_UP) pinRelay=Pin('GP16');pinRelay.value(1);pinRelay.mode(1) #set led off pinSchalter=Pin('GP17', Pin.IN, Pin.PULL_UP) changed: while pinSchalter == 0...
by Frida
Sat Dec 17, 2016 5:00 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 1717

Re: Sonoff: IRQ on push-button

On my wipy1, I can run this: # on wipy1 import micropython micropython.alloc_emergency_exception_buf(100) import time from machine import Pin #pinRelay = machine.Pin(12, machine.Pin.OUT) #pinSchalter = machine.Pin(0, machine.Pin.IN, machine.Pin.PULL_UP) pinRelay=Pin('GP16');pinRelay.value(1);pinRela...
by Frida
Sat Dec 17, 2016 3:36 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 1717

Re: Sonoff: IRQ on push-button

Boiled down, should if zeitschleifer >= 100:, not be if zeitschleife >= 100:
My bet.
by Frida
Thu Nov 10, 2016 6:23 pm
Forum: ESP8266 boards
Topic: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Replies: 76
Views: 22402

Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)

An extract from Espruino with Javascript, where we have wifi.save() var wifi = require("Wifi"); wifi.connect("my-ssid", {password:"my-pwd"}, function(ap){ console.log("connected:", ap); }); wifi.stopAP(); You may want to add wifi.setDHCPHostname("espruino"). Once you're happy with your connection, y...