Closed heX16 closed 3 years ago
Working: https://www.instagram.com/p/CL91-rrHANP/
(i use two SoftwareSerial - for CO2 sensor and PM5003 sensor.
Looks like the platformio travis integration now uses Python 3.7, it was 2.7 when I set it up.
In any case, I updated .travis.yml
(a0e326e) which fix most of the builds.
The examples/OLED_64x48
is still crashing, looks like the ESP8266_SSD1306
library is no longer available.
The
examples/OLED_64x48
is still crashing, looks like theESP8266_SSD1306
library is no longer available.
The ESP8266_SSD1306
library changed name to ESP8266 and ESP32 OLED driver for SSD1306 displays
The
ESP8266_SSD1306
library changed name toESP8266 and ESP32 OLED driver for SSD1306 displays
Fixed on 5e9de28. Please update your branch, so the builds succeed
Thanks for this PR. I learned something the Atmel AVR C++ compiler and the code got better.
Thanks again, Á.
Consider the following situations:
Serial.init(...)
is different (this situation already happened with ESP32).Serial
inherited fromStream
(such as AltSoftSerial).SoftwareSerial
, but responding to a different query format. This configuration is valid, and saving pins - is a common phenomenon. (similar to the situation in #5)In the current implementation of the library it is problematic to solve these problems (without modifying the library code). So I decided to expand PR and add more general mechanisms.
In normal projects, the problem of creating objects is solved through the "factory" pattern, but for MK this is superfluous.
It will take some more time to develop (more examples need to be written) and hopefully everyone will like the result.
Russian: Рассмотрим следующие ситуации:
Serial.init(...)
отличается (такая ситуация уже произошла с ESP32).Serial
унаследованную отStream
(например AltSoftSerial)..SoftwareSerial
, но отвечающий на другой формат запроса. Такая конфигурация валидна, и экономия пинов это обычное явление. (похоже на ситуацию в #5)В текущей реализации библиотеки решить эти проблемы (без внесения изменений в код библиотеки) проблематично. Поэтому я решил расширить PR и добавить более общие механизмы.
В обычных проектах проблему создания объектов решают через патерн "фабрика", но для МК это излишне.
Разработка займет еще некоторое время (нужно написать дополнительные примеры) и надеюсь результат понравится всем.
Changes
Core:
SoftwareSerial bug - https://github.com/avaldebe/PMserial/issues/19 Improving the binding to the
Serial
object