I have a question about zunoSendReport.
My goal is the measure the RSSI of the signal send out from Z-Uno.
What I try to do is, when the user press the service button, I will try to send out a signal, so that the usb sniffer can capture the signal and show the RSSI.
Here is the code I modified from sample code:
Code: Select all
#include "Arduino.h"
#include "ZUNO_Buttons.h"
#define MY_SERIAL Serial0
#define BUTTON 23
uint8_t dimmerValue = 0;
// the setup function runs once, when you press reset or power the board
void setup() {
MY_SERIAL.begin();
MY_SERIAL.println("Setup");
pinMode(LED_BUILTIN, OUTPUT);
Btn.addButton(BUTTON);
}
// the loop function runs over and over again forever
void loop() {
process_buttons();
MY_SERIAL.println("Loop");
}
void process_buttons() {
if (Btn.isSingleClick(BUTTON)) {
MY_SERIAL.println("isSingleClick");
zunoSendReport(1);
if (dimmerValue == 0)
{
digitalWrite(LED_BUILTIN, HIGH);
dimmerValue = 1;
}
else
{
digitalWrite(LED_BUILTIN, LOW);
dimmerValue = 0;
}
}
}
However I can see the Explorer Autoinclusion appears.
Anyone can give me some hints?
Thank you in advance.
Regards,
Lee
Regards,
Lee