Hello there,
Just got a Arduino Nano 33 IoT, and installed the Homeduino app on my homey pro.
Can’t add the arduino on the homey… Getting this message about UDP. Tried to port forward the port 46639.
Anyone have idea what is wrong?
This is my Code:
// Homeyduino - Version: Latest
#include <Homey.h>
#include <WiFiNINA.h>
//please enter your sensitive data in the Secret tab
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS; // the Wi-Fi radio's status
unsigned long previousMillisInfo = 0; //will store last time Wi-Fi information was updated
unsigned long previousMillisLED = 0; // will store the last time LED was updated
const int intervalInfo = 5000; // interval at which to update the board information
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial);
// attempt to connect to Wi-Fi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to network: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(10000);
}
// you're connected now, so print out the data:
Serial.println("You're connected to the network");
Serial.println("---------------------------------------");
//Start Homey library
Homey.begin("VacciGarage");
/* Note:
The name of each Arduino on the network needs to be unique
since it will be used as the unique identifier for your device.
The name is stored as a String and can thus be as long as you
desire it to be.
*/
//Register an example action
//Homey.addAction("myaction", onExampleAction);
//Register an example condition
//Homey.addCondition("mycondition", onExampleCondition);
/* Note:
* Names of actions and conditions can be at most 16 characters long.
* Names of both actions and conditions have to be unique on this device,
* which means that there can not be a condition and an action with the
* same name on the same device.
*
* An action is a function which returnes 'void'. While a condition is a function
* which returns a boolean ('bool').
*/
}
void loop() {
//Handle incoming connections
Homey.loop();
/* Note:
* The Homey.loop(); function needs to be called as often as possible.
* Failing to do so will cause connection problems and instability.
* Avoid using the delay function at all times. Instead please use the
* method explaind on the following page on the Arduino website:
* https://www.arduino.cc/en/Tutorial/BlinkWithoutDelay
*/
}