Programming styles of BLuetooth
Posted: Mon Aug 27, 2018 11:41 pm
So I am going to show my ignorance here, and ask how everyone programs Bluetooth, and seek guidance. I have been working on a datalogger for the last few months, and have it working perfectly as I want. It records right about 12,000 entries per day, and stores it all on a SD card in CSV format. I have a 4x20 LCD wired in to show live data as it comes in. Since I have about 40 of these loggers we are looking to deploy, if I could save the $20 a piece and just use a mobile device, i could save quite a bit of money.
Using the MIT app builder, displaying what I need shouldnt be a issue, so the issue for me is the Arduino code with Bluetooth. The examples in the IDE are less than desirable for what I am looking to accomplish, which is transmit 6 text strings about every second from the ESP to my phone. I uploaded the samples, and can get a string in no problem, but getting multiple strings in continuously seems to be escaping me. It looks like most of the examples write the one value during the setup phase of the program, and thats it.
I would suspect you would create the server in the setup, and assign the value to the characteristic UUID. But can you have more than one characteristic in the same service with a different UUID? Do you just dump all of the data into one long delimited field and sort it out on the app end, or do you make a new service for each characteristic UUID?
I found https://randomnerdtutorials.com/esp32-b ... duino-ide/
Are there any other must reads for the complete noob with BTLE?
Many thanks, Joe
Using the MIT app builder, displaying what I need shouldnt be a issue, so the issue for me is the Arduino code with Bluetooth. The examples in the IDE are less than desirable for what I am looking to accomplish, which is transmit 6 text strings about every second from the ESP to my phone. I uploaded the samples, and can get a string in no problem, but getting multiple strings in continuously seems to be escaping me. It looks like most of the examples write the one value during the setup phase of the program, and thats it.
I would suspect you would create the server in the setup, and assign the value to the characteristic UUID. But can you have more than one characteristic in the same service with a different UUID? Do you just dump all of the data into one long delimited field and sort it out on the app end, or do you make a new service for each characteristic UUID?
I found https://randomnerdtutorials.com/esp32-b ... duino-ide/
Are there any other must reads for the complete noob with BTLE?
Many thanks, Joe