Classic bluetooth serial - modifying an existing library

Posts: 1
Joined: Wed Jun 09, 2021 3:18 pm

Classic bluetooth serial - modifying an existing library

Postby Doz1971 » Wed Jun 09, 2021 3:28 pm

Hello. Thanks for having me.

I have an issue (which is why I'm here)

I am attempting to modify this library ... /GarminHUD

to work with ESP32's serial.BT

I've created a simple script which allows me to connect, and that works.

Obviously this library was never intended to work with ESP32's inbuilt bluetooth, so i *think* the parts I need to change are here, probably adding a bit in which uses serial.BT rather than either the inbuilt serial, or software serial on teensy or uno, for example.

I'm not here to ask someone to do this for me, but an explanation of what needs to happen, so I can learn. Google has sent me down a good few blind alleys so far.

Thanks in advance,

Code: Select all

class GarminHUD: public GarminHUDInterface{
	HardwareSerial _serial;
	HardwareSerial* _serial;
	SoftwareSerial* softserial;
	bool inSoftSerial = false;

	virtual int SendPacket(const char* pBuf, int nLen);
	GarminHUD() : GarminHUDInterface()  {};
	bool Init(HardwareSerial serial);
	bool Init(HardwareSerial* serial);
	bool Init(SoftwareSerial* serial);
	virtual ~GarminHUD();
	bool isInSoftSerial() {
		return inSoftSerial;


Who is online

Users browsing this forum: Bing [Bot] and 21 guests