Search found 14 matches

by sequel
Thu Oct 17, 2019 5:35 pm
Forum: General Discussion and Questions
Topic: I2C multiplexer library?
Replies: 4
Views: 5876

Re: I2C multiplexer library?

Finally got it working with this simple code, if that can help someone : tca9548a_test.py import machine import ustruct scl_pin=22 sda_pin=21 class TCA9548A(): def __init__(self,address): self.address=address self.bus=machine.I2C(-1, machine.Pin(scl_pin), machine.Pin(sda_pin)) def switch_channel(sel...
by sequel
Thu Oct 17, 2019 2:15 pm
Forum: General Discussion and Questions
Topic: I2C multiplexer library?
Replies: 4
Views: 5876

Re: I2C multiplexer library?

I am trying to use a tca9548a to drive 2 temperature/humidity sensors (si7021) on an esp32 board, using the CircuitPython code (https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A) and, i have no success so far. Here's what i have been doing so far : import machine import si7021 import tca95...
by sequel
Sat Mar 18, 2017 6:45 pm
Forum: Drivers for External Components
Topic: I2C LCD Library... Help!
Replies: 57
Views: 168424

Re: I2C LCD Library... Help!

Oh yeah! i've missed that one :)
by sequel
Sat Mar 18, 2017 6:33 pm
Forum: Drivers for External Components
Topic: I2C LCD Library... Help!
Replies: 57
Views: 168424

Re: I2C LCD Library... Help!

raspi3ua, did you try the code (esp8266_i2c_lcd.py and lcd.py) that i have posted on this thread on Sat Oct 01, 2016 2:36 am? NodeMCU is basically an esp8266 board so the code shall work. When using the two files mentioned above, you could try something like this (adjust the pins to your setup) : fr...
by sequel
Thu Nov 10, 2016 6:41 pm
Forum: Hardware Projects
Topic: HC-SR504 on esp8266
Replies: 5
Views: 6707

Re: HC-SR504 on esp8266

@ dwight.hubbard

Thanks for the pointer but I am already running the trigger on 5 volts.

@ deshipu

Thanks a lot for the suggestion.

I have tried using :

Code: Select all

time=time_pulse_us(echo_pin, 1, 29000)
...
distance=(time/2)/29

But it gives me exactly the same results.



Thanks again!
by sequel
Thu Nov 10, 2016 12:26 am
Forum: Hardware Projects
Topic: HC-SR504 on esp8266
Replies: 5
Views: 6707

HC-SR504 on esp8266

Hi list, I have been running an ultrasonic sensor on a raspberry pi for a while, with quite some good results. I wanted to port this on an esp8266 and, it looks like the result are a bit less accurate than on the pi. Here is the graphs usage of each one : pi : pi_hc-sr504.png esp8266 : esp8266_hc-sr...
by sequel
Thu Oct 06, 2016 1:42 pm
Forum: Drivers for External Components
Topic: I2C LCD Library... Help!
Replies: 57
Views: 168424

Re: I2C LCD Library... Help!

Hi Electra,

Thank you so much for your kind (LCD) message!

You just made my day :D
by sequel
Sat Oct 01, 2016 2:36 am
Forum: Drivers for External Components
Topic: I2C LCD Library... Help!
Replies: 57
Views: 168424

Re: I2C LCD Library... Help!

Hi Electra, So sorry for the late reply. Here is the code, esp8266_i2c_lcd.py : """Implements a character based lcd connected via PCF8574 on i2c.""" from lcd import LcdApi from machine import I2C from time import sleep_ms DEFAULT_I2C_ADDR = 0x27 # Defines shifts or masks for the various LCD line att...
by sequel
Fri Aug 05, 2016 7:33 pm
Forum: Drivers for External Components
Topic: I2C LCD Library... Help!
Replies: 57
Views: 168424

Re: I2C LCD Library... Help!

Yeah i was exactly thinking about this while i was at my second attempt to modify pyb_i2c_lcd.py but finally i took your advise and used bytes() in the end, which makes the code more cleaner i think.


Thanks again!
by sequel
Thu Aug 04, 2016 7:36 pm
Forum: Drivers for External Components
Topic: I2C LCD Library... Help!
Replies: 57
Views: 168424

Re: I2C LCD Library... Help!

Cool! Thank you so much for the tip!

I have now a second, cleaner, working version!


Thanks again!