comet424
(Comet424)
November 27, 2021, 7:18pm
1
can you guys tell me whats wrong? i able to get the SSD1306 screen to work on the
but when i do it on the mini D1… as i want it more compact i cant get to work… i get a communication error…
[14:10:24][C][wifi:357]: Signal strength: -45 dB ▂▄▆█
[14:10:24][C][wifi:361]: Channel: 6
[14:10:24][C][wifi:362]: Subnet: 255.255.255.0
[14:10:24][C][wifi:363]: Gateway: 192.168.0.1
[14:10:24][C][wifi:364]: DNS1: 192.168.0.33
[14:10:24][C][wifi:365]: DNS2: 0.0.0.0
[14:10:24][C][logger:233]: Logger:
[14:10:24][C][logger:234]: Level: DEBUG
[14:10:24][C][logger:235]: Log Baud Rate: 115200
[14:10:24][C][logger:236]: Hardware UART: UART0
[14:10:24][C][i2c.arduino:032]: I2C Bus:
[14:10:24][C][i2c.arduino:033]: SDA Pin: GPIO5
[14:10:24][C][i2c.arduino:034]: SCL Pin: GPIO4
[14:10:24][C][i2c.arduino:035]: Frequency: 50000 Hz
[14:10:24][C][i2c.arduino:038]: Recovery: bus successfully recovered
[14:10:24][I][i2c.arduino:048]: Scanning i2c bus for active devices...
[14:10:24][I][i2c.arduino:060]: Found no i2c devices!
[14:10:24][C][ssd1306_i2c:023]: I2C SSD1306
[14:10:24][C][ssd1306_i2c:023]: Rotations: 0 °
[14:10:24][C][ssd1306_i2c:023]: Dimensions: 128px x 64px
[14:10:24][C][ssd1306_i2c:024]: Address: 0x3C
[14:10:24][C][ssd1306_i2c:025]: Model: SSD1306 128x64
[14:10:24][C][ssd1306_i2c:026]: Reset Pin: GPIO16
[14:10:24][C][ssd1306_i2c:027]: External VCC: NO
[14:10:24][C][ssd1306_i2c:028]: Flip X: YES
[14:10:24][C][ssd1306_i2c:029]: Flip Y: YES
[14:10:24][C][ssd1306_i2c:030]: Offset X: 0
[14:10:24][C][ssd1306_i2c:031]: Offset Y: 0
[14:10:24][C][ssd1306_i2c:032]: Inverted Color: NO
[14:10:24][C][ssd1306_i2c:033]: Update Interval: 1.0s
[14:10:24][E][ssd1306_i2c:036]: Communication with SSD1306 failed!
[14:10:24][C][captive_portal:151]: Captive Portal:
[14:10:24][C][ota:082]: Over-The-Air Updates:
[14:10:24][C][ota:083]: Address: car-temp.local:8266
[14:10:24][C][ota:086]: Using Password.
[14:10:24][C][api:134]: API Server:
[14:10:24][C][api:135]: Address: car-temp.local:6053
[14:10:24][C][api:139]: Using noise encryption: NO
[14:10:24][C][mdns:084]: mDNS:
[14:10:24][C][mdns:085]: Hostname: car-temp
code i have i stripped it right down to nothing trying to figure it out and i have tried it on 2 different Mini Ds and still wont work
esphome:
name: car-temp
# platform: ESP8266
# board: nodemcuv2
platform: ESP8266
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "cdcbe64916c6e40cc4b331f94096eb68"
wifi:
# ssid: "test"
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Car-Temp Fallback Hotspot"
password: "zXXAgyYrjW9h"
captive_portal:
globals:
- id: t_sw_bool
type: bool
font:
- file: "_fonts/nasalization.ttf"
id: font1
size: 23
- file: "_fonts/refsan.ttf"
id: font2
size: 35
i2c:
sda: GPIO5
scl: GPIO4
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
reset_pin: D0
address: 0x3C
lambda: |-
it.print(0, 0, id(font1), "Hello World!");
comet424
(Comet424)
November 27, 2021, 7:47pm
2
i did have it say it found the ic2 device but then gives communication error below
(didnt record it at the time)
but maybe its the wiring?? i havent soldered it to a board… just using jumpers so figured maybe its loose?
but i have an issue… i trying to do temperature… and humidity show temperature then update iterval then refresh screen with humidity… but it didnt like the code
i tried delay in the lambada code but it actually smeared the text… how do u clear screen i tried googling but i didnt find what i was looking for
i find if i change the D1 D2 the the GPIO4 5 labels i get different results…
but with the code i have that works on the other type of esp12e i cant get it to update with the delay
and i think i may just solder wires so i get a tight fit for d1
but here the code i having issues with the flipping back and forth the humidty temp
esphome:
name: car-temp
# platform: ESP8266
# board: nodemcuv2
platform: ESP8266
board: d1_mini
on_boot:
priority: -100
then:
- lambda: id(oled).turn_on();
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "cdcbe64916c6e40cc4b331f94096eb68"
wifi:
# ssid: "test"
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Car-Temp Fallback Hotspot"
password: "zXXAgyYrjW9h"
captive_portal:
# Turn off Flashing Blue Led
#status_led:
# pin:
# number: GPIO0
# inverted: true
# Temperature Settings
sensor:
- platform: dht
model: am2302
pin: D3
temperature:
name: "Car Outside Temperature"
id: outside_temperature
# filters:
# offset: 2
humidity:
name: "Car Outside Humidity"
id: outside_humidity
update_interval: 6s
# Physical Touch Switch
globals:
- id: t_sw_bool
type: bool
# Example configuration entry
i2c:
sda: D2
scl: D1
font:
- file: "_fonts/nasalization.ttf"
id: font1
size: 23
- file: "_fonts/refsan.ttf"
id: font2
size: 35
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
id: oled
reset_pin: D0
address: 0x3C
lambda: |-
it.printf(0, 0, id(font1), "Temperature");
it.printf(0, 22, id(font2), TextAlign::TOP_LEFT , "%.1f°c", id(outside_temperature).state);
delay (500);
it.printf(0, 0, id(font1), "Humidity");
it.printf(0, 22, id(font2), TextAlign::TOP_LEFT , "%.1f%%", id(outside_humidity).state);
nickrout
(Nick Rout)
November 27, 2021, 8:34pm
3
Quite likely if it detected the device one time but not the other.
iridris
(Steven)
November 27, 2021, 11:20pm
4
I had trouble with the same combo using cheap jumper wires from Amazon. Once I soldered it all together it worked flawlessly.
1 Like
glyndon
November 27, 2021, 11:44pm
5
Same here. Turns out those cheap jumpers are poorly made at the connector crimp, which clamps the insulation but not so much the wire.
comet424
(Comet424)
November 28, 2021, 12:24am
6
ya i ended up soldering wires and got the display to work… its hell i should have also bought the pcbs where all the holes are connected in strips… soldering and trying to join 2 holes together with solder or if i make wire longer and bend over was still nightmare what a headache
least its working…
now my question is how can i cycle the temperature and humidity like temp stays on 5 seconds and then humidity 5 seconds… and that it still updates… i tried googling but it didnt help…
but ya i was usng those cheap amazon ones u buy the pack of female to female male to male and male to female packs… i been using them for just testing but are they good enough to solder on to the pcb boards?
glyndon
November 28, 2021, 12:26am
7
To use them you’d have to slide the connector cover back (toward the wire) on each end, solder the wire where the crimp has it, and slide the cover back up. Oh, and have to do this without breaking off the locking tab on the cover. It’s not fun. But then they become reliable.
1 Like
comet424
(Comet424)
November 28, 2021, 1:08am
8
ah ok learn something new everyday…
and do you guys know how to cycle the screen when i try all it does it it smears the text
i trying to do show the temperature then 5 seconds later shows Humidity then 5 seconds back to temp and so on
and the temperature/humidity update interval is set for 6 seconds
nickrout
(Nick Rout)
November 28, 2021, 3:13am
9
jsuanet
(Jos)
November 28, 2021, 9:25pm
10
comet424
(Comet424)
November 30, 2021, 12:58am
11
ok ill check it out thanks (
comet424
(Comet424)
November 30, 2021, 1:23am
12
ok that works great i did the interval and the show next… works very well
thank you very much…
very appreciative
MustiCikla
(MustiCikla)
December 26, 2022, 9:29pm
13
Can you give us sample code?