Some questions about using the CAYENNE API

Good afternoon!
Immediately I apologize for my English, as I am writing via Google translator.
There were a couple of questions about working with the Caeynne cloud. There is a debug dimmer board for ESP-01. For debugging, I transfer data to the clouds, I would like to use the API correctly

  1. Function Cayenne.begin (username, Password, clientID, ssid, password); gets WiFI connection parameters. Do I need to use the following functions in my sketch?
    WiFi.mode (WIFI_STA);
    WiFi.begin (ssid, password);
    while (WiFi.waitForConnectResult ()! = WL_CONNECTED) {
    Also, the device should work in the absence of WiFi, is it possible to check that there is no connection to the cloud?
  2. Also a question about using the Cayenne.loop () function; How to correctly indicate in the code with what frequency to transfer data to the cloud. I read on github that you should not transmit more than 10 values ​​per second
    // This function sends the device’s uptime to Cayenne on Virtual Channel 5.
    void sendUptime ()
    {
    // Send values ​​using the virtualWrite function. Cayenne currently accepts int and float values.
    // Please don’t send more that 10 values ​​per second.
    Cayenne.virtualWrite (5, millis () / 1000);
    }
    3.Also a question on the CAYENNE_OUT_DEFAULT () function
    What is the difference between this function and CAYENNE_OUT (channel_number)

you don’t need any other function, the Cayenne.begin() join the wifi mentioned and connects to cayenne.
The cayenne library does not work in offline mode as it loops to check if the internet connection is back on the mentioned wifi.

The Cayenne,loop() is to check the connection. To send data you need to use CAYENNE_OUT() which send data at 15 seconds interval. If you want to do it in the main loop then you can use millis to send data at a timed intervals

CAYENN_OUT(channel_number) is function to send data to only one channel.
CAYENNE_OUT_DEFAULT () is to send data on all channel.