aREST icon indicating copy to clipboard operation
aREST copied to clipboard

Software/Serial Support for ESP8266 & ESP32

Open tolster710 opened this issue 8 years ago • 3 comments
trafficstars

I'd like to use aREST in an upcoming project, Incorporating an API exposed over WIFI and BT concurrently.

In prototyping with an ESP8266 + HC-06 BT Module, I am struggling with attaching the rest object to a serial (or swserial) port for handling requests.

aREST rest = aREST();
rest.handle(Serial);

no matching function for call to 'aREST::handle(HardwareSerial&)'

tolster710 avatar Mar 31 '17 22:03 tolster710

I think this is basically because once the IDE detects the ESP8266, it automatically switches to the WiFi connection. I'll need to add an option to allow using two aREST instances at the same time. Is that what you are trying to do?

marcoschwartz avatar Apr 02 '17 14:04 marcoschwartz

Nominally, yes. I would create two aREST instances, each serving one of these mediums. I may work I work towards having a single aREST instance, with a wrapper for handling requests from either connection. I'm very new to aREST, but I think this functionality could be very useful. I saw these boards from pycom are being released soon, and see a lot of promise for a unified interface.

Also for now, I'm just trying to prototype on a serial given that I want to try to incorporate BT.

tolster710 avatar Apr 03 '17 02:04 tolster710

Really interesting indeed! Marking that as a feature request :)

marcoschwartz avatar Apr 04 '17 15:04 marcoschwartz