Search found 14 matches
- Thu Oct 17, 2019 5:35 pm
- Forum: General Discussion and Questions
- Topic: I2C multiplexer library?
- Replies: 4
- Views: 5907
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...
- Thu Oct 17, 2019 2:15 pm
- Forum: General Discussion and Questions
- Topic: I2C multiplexer library?
- Replies: 4
- Views: 5907
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...
- Sat Mar 18, 2017 6:45 pm
- Forum: Drivers for External Components
- Topic: I2C LCD Library... Help!
- Replies: 57
- Views: 176769
- Sat Mar 18, 2017 6:33 pm
- Forum: Drivers for External Components
- Topic: I2C LCD Library... Help!
- Replies: 57
- Views: 176769
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...
- Thu Nov 10, 2016 6:41 pm
- Forum: Hardware Projects
- Topic: HC-SR504 on esp8266
- Replies: 5
- Views: 6777
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 :
But it gives me exactly the same results.
Thanks again!
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!
- Thu Nov 10, 2016 12:26 am
- Forum: Hardware Projects
- Topic: HC-SR504 on esp8266
- Replies: 5
- Views: 6777
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...
- Thu Oct 06, 2016 1:42 pm
- Forum: Drivers for External Components
- Topic: I2C LCD Library... Help!
- Replies: 57
- Views: 176769
Re: I2C LCD Library... Help!
Hi Electra,
Thank you so much for your kind (LCD) message!
You just made my day
Thank you so much for your kind (LCD) message!
You just made my day
- Sat Oct 01, 2016 2:36 am
- Forum: Drivers for External Components
- Topic: I2C LCD Library... Help!
- Replies: 57
- Views: 176769
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...
- Fri Aug 05, 2016 7:33 pm
- Forum: Drivers for External Components
- Topic: I2C LCD Library... Help!
- Replies: 57
- Views: 176769
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!
Thanks again!
- Thu Aug 04, 2016 7:36 pm
- Forum: Drivers for External Components
- Topic: I2C LCD Library... Help!
- Replies: 57
- Views: 176769
Re: I2C LCD Library... Help!
Cool! Thank you so much for the tip!
I have now a second, cleaner, working version!
Thanks again!
I have now a second, cleaner, working version!
Thanks again!