SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
User avatar
By PacoBelan
I was able to download nRF Connect app from the Google Play store and connect to the Artemis using the example BLE code. I was able to send x3 different "Immediate Alert" codes from the phone app to the Artemis ("WRITE") however I would now like to send codes from the Artemis to the phone ( "READ").

I see that under "Link Loss" there is an "Alert Level" that supports both READ and WRITE. What I would like to do is use the Serial Monitor to keyboard type in a code and have the Artemis send that code to the phone app. Is there some hacky but reliable way of doing this?

I am creating an embedded prototype with a companion app. I suspect that for now at least, I will send off bursts of these alert levels so that they match some lookup table that contains the data I need to Read and Write. Unless any of you have another way of doing this. Thank you for your input.
User avatar
By KyleW
Hello, I am not sure which example you have working right now. But if you are looking at the arduinoBLE the LED example is similar to the on you are describing. In this example the artemis is a peripheral device, and is acting based on your edits to a service.
The LedControl example is the matching pair to this example. This example acts as a central device, and connects to a peripheral that is running the first example.
An example that may run more closely to what you have in mind the the BatteryMonitor example. In this example the artemis is acting as a peripheral again, but is writing to a service that you can view on the phone. If you want you can swap the line int battery = analogRead(A0); with int battery = random(1023); for a quick proof of concept to see the affect if you don't want to bother with the analog read.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]