Hi I have a BLE 33 and I would like to ask my device blink based on selection in an iOS app.
Here are things I already know how to do:
- Connect to the BLE 33 in iPhone and write characteristics
- How to blink an LED in a program that transfer through USB to BLE 33
Here are things I need some pointers:
Instead of writing:
void loop() {
digitalWrite(D11, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(D11, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
How do I ask D11 to blink based on a file on Arduino e.g. Json or binary? My assumption is some pseudo code like this:
load_json_library
load_json_file
parse_json_file and get PORT and TIME
void loop() {
digitalWrite(PORT, HIGH); // turn the LED on (HIGH is the voltage level)
delay(TIME); // wait for a second
digitalWrite(PORT, LOW); // turn the LED off by making the voltage LOW
delay(TIME); // wait for a second
}
Am I on the right track? Could you please share some links of similar examples that I could follow? Thank you!