3 /* Wi-Fi credentials */
4 const char config_wifi_ssid
[] = "THEWIFISSID";
5 const char config_wifi_pass
[] = "THEWIFIPASSWORD";
7 /* Network address of the server to contact */
8 const char config_tattle_server_ip_address
[] = "192.168.10.10";
9 const u16_t config_tattle_port
= 29803; // 'tk'
11 /* For distinguishing reports from multiple tattlekey devices. */
12 const u16_t config_this_tattler_identity
= 1;
14 /* Which GPIO pin is the button connected to?
15 * The button should span this pin and ground, connecting this pin to ground
17 * https://projects.raspberrypi.org/en/projects/introduction-to-the-pico/10
18 * recommends pins 18, 22, or 28. */
19 const uint config_button_pin
= 18;
21 /* Don't bother reporting each separate button press when it is pressed many
22 * times in short succession. (We also use this to de-bounce. :) */
23 const u32_t config_minimum_seconds_between_button_presses
= 1;
25 /* Send each report multiple times. Re-sends are sent with exponential delay:
33 * #12 after 17 minutes
34 * #13 after 34 minutes
35 * #14 after 68 minutes
40 * This provides some robustness against network outages, automatically
41 * replaying the log periodically to be collected after connectivity
44 * Values above 17 are currently not recommended because the current
45 * wire format uses a 16-bit field for a duration in seconds, which wraps
48 const uint config_resend_count
= 16;
50 /* These control the size of the per-send-count press queues.
51 When the button is pressed more than config_maximum_queue_size times
52 within the resend interval, some presses will be reported fewer
53 than config_resend_count times. This is usually fine because it's
54 the old, longest-delayed, most-redundant reports that get dropped;
55 fresh, timely reports of new button presses will not get anywhere near
56 config_resend_count in a resend interval because the early resend internals
58 const uint config_maximum_queue_size
= 512;
60 /* This is paranoia about unanticipated delays. Setting this to zero
61 would probably be fine, but imposing a minimum queue size is an easy
63 const uint config_minimum_queue_size
= 32;