Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for ESP8266 #7

Closed
mareksugar opened this issue Mar 16, 2018 · 7 comments
Closed

support for ESP8266 #7

mareksugar opened this issue Mar 16, 2018 · 7 comments

Comments

@mareksugar
Copy link

Hi bbqkees,

I am trying to compile program for Wemos D mini board, but it end with 'nefitSerial' was not declared in this scope.
Could you point me out what need to be change in NefitSerial.h library to support ESP8266 boards?

@bbqkees
Copy link
Owner

bbqkees commented Mar 16, 2018

The Wemos D1 Mini is based on the ESP8266, which is incompatible with the NefitSerial library.
The NefitSerial library is meant for use with Atmel AVR type Arduino's like the Uno and Mega.

Adaptation for the completely different chipset of the ESP8266 therefore needs considerable rework of the ESP Arduino library.

What you can do instead is use an Uno/Mega to interface with the EMS bus and the Wemos to transfer data to and from the Arduino with Wi-Fi.

@bbqkees
Copy link
Owner

bbqkees commented Mar 16, 2018

By the way the specific error you get usually means you did not include the library correctly.
So the library needs to be installed on your pc in the Arduino library directory. And afterwards you need to restart the Arduino IDE otherwise it can't see it.

But as just mentioned, you can't use this library with the ESP anyway.

@mareksugar
Copy link
Author

Yes, my fault, error which I have is Error compiling for board WeMos D1 R2 & mini.

I mean I asked badly.
If library nefitSerial is just little bit modified library HardwareSerial, what you mentioned here:
#3

could you help me/point me what needs to be change/add in library HardwareSerial.cpp for ESP8266
https://github.com/esp8266/Arduino/blob/master/cores/esp8266/HardwareSerial.cpp
to modify it same way as you modified AVR HardwareSerial library.

@bbqkees
Copy link
Owner

bbqkees commented Mar 16, 2018

The basic thing to do is to bring up the ESP8266 interrupt for frame error into the library, so you can add functions that can act on the occurrence of the frame error.
If you check the readme page of the NefitSerial library there is some more info on that.

You need to modify the core libraries uart and HardwareSerial.

The second thing you need to do is to figure out how to generate a frame error sequence on the low level ESP UART.

Both are not that straightforward to do. The original additions to the Atmel-type Arduino serial library might indeed seem simple but they took considerable work and testing by the creator to find out.

@mareksugar
Copy link
Author

thank you, I didnt notice README under Nefitserial
I found post about serialEvent implementation in ESP8266
esp8266/Arduino#2237
so I will try this way

@proddy
Copy link

proddy commented May 23, 2018

@mareksugar check out https://github.com/proddy/EMS-ESP-Boiler. I worked with bbqkees on the implementation of his circuit for the ESP8266

@mareksugar
Copy link
Author

thank you so much, it looks really interesting :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants