arduino:wio-setup-en
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | arduino:wio-setup-en [2025/05/29 09:05] (current) – [CVs] rjversluis | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | [[: | ||
+ | [[: | ||
+ | ======WIO - Setup====== | ||
+ | [[: | ||
+ | **[[: | ||
+ | * **[[: | ||
+ | |||
+ | |||
+ | \\ | ||
+ | |< >| | ||
+ | | Rocview -> Menu -> Programming -> WIO | | ||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | * No setup is possible if there are multiple devices with the same ID; Power on just one with that ID and change it. | ||
+ | * :!: Check all settings after upgrading a older WIO version with a new one; Some option flags are recycled for other purposes. | ||
+ | \\ | ||
+ | < | ||
+ | =====Query===== | ||
+ | With a query all active WIO devices will respond with there ID, Type and configuration.\\ | ||
+ | {{: | ||
+ | ====Set==== | ||
+ | With the Set button the ID, name and Type can be changed.\\ | ||
+ | ^ Type ^ Functions ^ | ||
+ | | Control | Throttle using short IDs | | ||
+ | | LED | 32 I2C I/O and FastLED | | ||
+ | | SERVO | 32 I2C I/O and Servos | | ||
+ | | RFID | 32 I2C I/O and RFID | | ||
+ | | DCC | 32 I2C I/O and DCC CS or Booster | | ||
+ | | Mobile | 32 I2C I/O and PWM to control a H-Bridge or RC ESC | | ||
+ | | CAN | WiFi-TCP interface between 250kb CAN and Rocrail on port 5550 | | ||
+ | | Ext | ESP32: CANIO + LED + SERVO + RFID | | ||
+ | | S88 | Märklin sensor bus | | ||
+ | | IO16 | All-rounder | | ||
+ | |||
+ | ====Reboot==== | ||
+ | Reboots the selected WIO module.\\ | ||
+ | |||
+ | |||
+ | ====DeepSleep/ | ||
+ | Shutdown the selected WIO module.\\ | ||
+ | All WIO modules will shutdown in case the **All** option is selected.\\ | ||
+ | |||
+ | |||
+ | |||
+ | ====Report==== | ||
+ | {{: | ||
+ | A usage report is generated for all WIO modules in the query.\\ | ||
+ | The default program wil be started to view the CSV file.\\ | ||
+ | |||
+ | ==== WEB Browser ==== | ||
+ | |||
+ | This function opens the default web browser and connects to the IP address of the selected WIO.\\ | ||
+ | {{: | ||
+ | |||
+ | The following settings can be configured via the web interface: | ||
+ | |||
+ | * IP address of the Rocrail server | ||
+ | |||
+ | * Name of the WIO | ||
+ | |||
+ | * SSID and password for the first and second WiFi connection | ||
+ | |||
+ | After entering the desired data, click the Submit button to apply the changes. | ||
+ | |||
+ | **List files...**\\ | ||
+ | Opens the file view of the WIO's flash memory. The following files can be managed here: | ||
+ | |||
+ | * [[: | ||
+ | |||
+ | * [[: | ||
+ | |||
+ | * [[: | ||
+ | |||
+ | * [[: | ||
+ | |||
+ | **WiFi tracing**\\ | ||
+ | With the WiFi tracing ON/OFF switch you can activate and deactivate the debug output of the serial interface, in the trace and as output in Rocview under Controller. | ||
+ | |||
+ | ====CAM Stream==== | ||
+ | In case of type CAM the streaming link can be used: | ||
+ | < | ||
+ | http://< | ||
+ | </ | ||
+ | \\ | ||
+ | |||
+ | ====Show==== | ||
+ | The selected WIO will flash its LED faster until the Show command is send again by pushing this button.\\ | ||
+ | |||
+ | \\ | ||
+ | =====WIO Type===== | ||
+ | ====Mobile==== | ||
+ | H-Bridge motor support for ESP8266 and ZeroW(WIOpi).\\ | ||
+ | |||
+ | ====CAN==== | ||
+ | {{: | ||
+ | The extra service on port 5550 can be used to communicate with a CAN bus like MBUS.\\ | ||
+ | A power off command is send to CAN if the WiFi or Rocrail connection is lost.\\ | ||
+ | |||
+ | \\ | ||
+ | < | ||
+ | =====Setup===== | ||
+ | {{: | ||
+ | ====Pulse==== | ||
+ | Count of 100ms for setting the output pulse length.\\ | ||
+ | Also used for dual coil switch motors.\\ | ||
+ | |||
+ | ====Port==== | ||
+ | ===Invert=== | ||
+ | Logically invert output/ | ||
+ | |||
+ | |||
+ | ====Serial==== | ||
+ | The RX/TX pins on the ESP8266 are the same as used by the serial monitor.\\ | ||
+ | The serial monitor will get read only, and swapped to another baudrate, when using the RX for other devices.\\ | ||
+ | ===Monitor=== | ||
+ | Default serial Monitor at 57600bps.\\ | ||
+ | ===RailCom=== | ||
+ | RailCom reader, [[: | ||
+ | ===RFID=== | ||
+ | RFID ID-12LA reader at 9600bps.\\ | ||
+ | |||
+ | For RailCom and RFID: If the serial monitor is still needed for tracing, the baudrate must be adjusted in the Arduino IDE.\\ | ||
+ | \\ | ||
+ | ====DCC==== | ||
+ | ===Power monitor=== | ||
+ | In combination with a H-Bridge, WIO-Drive, WIO-Prog and WIO-Boost, the power monitor must be enabled to be able to power on and short circuit detection. A WIO reboot is required. | ||
+ | |||
+ | ===Booster=== | ||
+ | Use an external DCC __3V3__ signal. (1.63+)\\ | ||
+ | See the IBB connector on the WIO-Boost and WIO-Drive.\\ | ||
+ | It will power off automatically in case no DCC signal is detected.\\ | ||
+ | |||
+ | ===RailCom=== | ||
+ | Enable RailCom cutout in the preamble and idle packet.\\ | ||
+ | Disable this option in case none RailCom decoders are used.\\ | ||
+ | |||
+ | ===Fast PT=== | ||
+ | Only one packet stream instead of 4 x reset plus 6 x program are send to the PT.\\ | ||
+ | **Note:** Not all decoders will accept this none NMRA conform sequence.\\ | ||
+ | \\ | ||
+ | ====Mobile servo PWM==== | ||
+ | ===ESC PWM=== | ||
+ | In case of WIO Mobile, this option will set servo compatible PWM on the D5 pin, which can be used to connect a RC ESC. (**E**lectronic **S**peed **C**ontrol)\\ | ||
+ | |||
+ | \\ | ||
+ | ==== Display ==== | ||
+ | ===Rotate 180°=== | ||
+ | Rotate the display content 180°.\\ | ||
+ | ===Geometry=== | ||
+ | Select the connected displays geometry.\\ | ||
+ | |||
+ | \\ | ||
+ | ====Control==== | ||
+ | ===Steps=== | ||
+ | Number of rotary ticks for 100% speed.\\ | ||
+ | ===Deep sleep=== | ||
+ | Put WIO Control into deep sleep after a time out of x minutes.\\ | ||
+ | ===Synchronize=== | ||
+ | Synchronize speed and function field events. __Disable in case of a slow network to avoid slider jumping.__\\ | ||
+ | :!: This option will only work well in case the used Command Station reports speed changed at once. In all other cases the WIO-Control cannot set the loco speed.\\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | ====Stepmotor==== | ||
+ | 3 Wire Fast uses a timer interrupt for a higher stepper frequency.\\ | ||
+ | Check the USERCNF.h for settings.\\ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====CAN==== | ||
+ | ===I/O=== | ||
+ | * For WIO-02 with an ESP32. See also: [[: | ||
+ | * **[[: | ||
+ | ===USB-Bridge=== | ||
+ | Interfacing between USB and CAN. | ||
+ | * RCAN bps=250000 | ||
+ | * MCAN bps=500000 | ||
+ | ===Pico CAN=== | ||
+ | Option for the **[[: | ||
+ | \\ | ||
+ | |||
+ | ====Extra==== | ||
+ | ===KeyPad=== | ||
+ | See: __**[[: | ||
+ | ===I/O1 Servos=== | ||
+ | The PicoW with type IO16 supports extra 8 servos on the I/O1 connector.\\ | ||
+ | The needed power supply should be also extra because the **[[: | ||
+ | |||
+ | ===PWM 100Hz=== | ||
+ | **[[: | ||
+ | Default is software PWM between 10 and 100Hz which can be set in the [[# | ||
+ | Low PWM frequencies are not recommended for dimming lights/LEDs because it will flicker.\\ | ||
+ | |||
+ | ===Sync Slave=== | ||
+ | In case of software **[[: | ||
+ | The slave WIO's will activate an interrupt on the HALL pin so the PWM will be in sync with the master.\\ | ||
+ | This option makes only sense in case of a **[[: | ||
+ | **Note:** //If this option is set without a master sync on the HALL pin the generated PWM is useless,// | ||
+ | |||
+ | ===SPI Clock=== | ||
+ | Support for the **[[: | ||
+ | |||
+ | ===Analog multiplex=== | ||
+ | See [[: | ||
+ | |||
+ | ===LDR=== | ||
+ | LDR between 3V3 and GP28 needs 10 kOhm pulldown. (PicoW)\\ | ||
+ | This will report the brightness to Rocrail. ([[: | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | ====Preload==== | ||
+ | Specify functionality at WIO startup. This prevent other 'on the fly' function by command.\\ | ||
+ | |< >| | ||
+ | ^ Function ^ Remark ^ | ||
+ | | Servos | Initialise all 12 servos in combination with the **I/O1 Servos** extra. | | ||
+ | | PWMPair | Required in case of master PWM of multiple WIOs | | ||
+ | | DCC | | | ||
+ | | Mobile | | | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ====Set==== | ||
+ | With the Set button the pulse length, options and the selected I2C field can be changed.\\ | ||
+ | > **Note:** //SPI communication will break because of I/O re-init; Reboot the WIO if needed.//\\ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | < | ||
+ | =====Maintenance===== | ||
+ | Setup the basic connections can be done on this tab:\\ | ||
+ | {{: | ||
+ | - Plug in the ESP/PicoW cable into an USB port on the computer | ||
+ | - **Query devices** | ||
+ | - Select the ESP/PicoW USB device from the list | ||
+ | - **Connect** | ||
+ | - Type in the connection parameters and push **Set** | ||
+ | |||
+ | The WIO is ready for use.\\ | ||
+ | |||
+ | **Note 1:** Automatic Server needs an active __**[[: | ||
+ | **Note 2:** The Identify Number must be set unique among all WIO' | ||
+ | |||
+ | ====Query Devices==== | ||
+ | Query serial USB devices, and try to preselect one.\\ | ||
+ | Click on Connect after selecting the right device to be able to communicate with the ESP/Pico.\\ | ||
+ | **Note:** //Under Windows serial devices are scanned up to COM20. Higher COM ports can be typed in manually in this field.//\\ | ||
+ | ====Connect==== | ||
+ | Try to make a 115200 baud connection with the selected serial device.\\ | ||
+ | __**Notes: | ||
+ | * //Make sure the user is in the [[: | ||
+ | * //If some other process(Arduino IDE Monitor) has already a connection with the selected device, it is not possible todo the Maintenance.// | ||
+ | ====DTR==== | ||
+ | Activates the "Data Terminal Ready" to signal the connected microcontroller that it can send data.\\ | ||
+ | //This option is temporare and should be left checked.// | ||
+ | |||
+ | ====Disconnect==== | ||
+ | Disconnect from the serial device. This will be done automatically on closing the WIO Setup dialog.\\ | ||
+ | \\ | ||
+ | ====WLAN==== | ||
+ | ===Name=== | ||
+ | SSID name, without blanks, to use for the WiFi connection.\\ | ||
+ | Max. length is 32 characters incl. the zero termination.\\ | ||
+ | :!: //Only **[[https:// | ||
+ | ===Scan=== | ||
+ | Let the connected WIO module search for available networks. This will fill up the Name combobox.\\ | ||
+ | ===Password=== | ||
+ | The password for the selected SSID name without blanks. Activating the checkbox will makes the password readable.\\ | ||
+ | Max. length is 32 characters incl. the zero termination.\\ | ||
+ | :!: //Only **[[https:// | ||
+ | |||
+ | ===Static IP=== | ||
+ | If set to 0.0.0.0 (default) the WIO will become from the router an IP assigned.\\ | ||
+ | |||
+ | |||
+ | ===Set=== | ||
+ | Sends the SSID name and password to the connected WIO module.\\ | ||
+ | |||
+ | \\ | ||
+ | ====Server==== | ||
+ | ===Name=== | ||
+ | The DNS name or IP address of the Rocrail server.\\ | ||
+ | ===Automatic=== | ||
+ | Use UDP Multicast, R2RNet, to find a Rocrail server.\\ | ||
+ | :!: //Multicast must be enabled in the network router to be able to find the Rocrail server automatically.// | ||
+ | ===R2RNet=== | ||
+ | User besides TCP also UDP Multicast for RASCII communication. (WIP)\\ | ||
+ | ===Set=== | ||
+ | Sends the server name to the connected ESP.\\ | ||
+ | |||
+ | \\ | ||
+ | ====Identity & Type==== | ||
+ | ===Number=== | ||
+ | Unique node ID.\\ | ||
+ | ===Name=== | ||
+ | Optional node name.\\ | ||
+ | ===Type=== | ||
+ | WIO main function.\\ | ||
+ | ===Set=== | ||
+ | Sends the ID and type to the connected ESP.\\ | ||
+ | ===Export=== | ||
+ | Export settings in a CSV file.\\ | ||
+ | ===Import=== | ||
+ | Import settings from a CSV file.\\ | ||
+ | |||
+ | \\ | ||
+ | ==== Terminal ==== | ||
+ | Manual terminal commands field.\\ | ||
+ | Press enter or click on the ">>" | ||
+ | See: **[[: | ||
+ | \\ | ||
+ | ==== ? ==== | ||
+ | Refresh the terminal with the ?< | ||
+ | |||
+ | \\ | ||
+ | ==== I/O ==== | ||
+ | Port usage.\\ | ||
+ | ===Set=== | ||
+ | Sends the port usage to the connected ESP.\\ | ||
+ | |||
+ | \\ | ||
+ | ====Debug/ | ||
+ | Switch between Info and Debug trace level.\\ | ||
+ | |||
+ | \\ | ||
+ | ====SoD==== | ||
+ | Sends a start of day command to the connected ESP.\\ | ||
+ | |||
+ | \\ | ||
+ | ====Reset==== | ||
+ | Reset the part of the Flash memory on which the WIO configuration is located.\\ | ||
+ | **Tip:** //Use this if the ESP/Pico was loaded before with another sketch to get the default WIO configuration.// | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | < | ||
+ | =====Update===== | ||
+ | WIO binaries for ESP8266 and ESP32 can be uploaded by OTA.\\ | ||
+ | {{: | ||
+ | - Select the WIO on the Query tab. | ||
+ | - Goto the Update tab. | ||
+ | - Select the target binary; Can be downloaded __**[[https:// | ||
+ | - Adjust the OTA password if needed. (Default is " | ||
+ | - Push the OTA button. | ||
+ | |||
+ | ====Start OTA==== | ||
+ | if the file name is left empty the selected WIO module will be set in OTA mode for updating the firmware over the air by other tools like the Arduino IDE.\\ | ||
+ | The number, at the right of the "Start OTA" button, is the pause in seconds between activating OTA and uploading the binary. Some microcontrollers need some more time to prepare. (ESP8266)\\ | ||
+ | |||
+ | \\ | ||
+ | ====OTA from Scratch==== | ||
+ | To avoid bothering with the needed libraries for the WIO Sketch this {{: | ||
+ | ( The Sketch can also be downloaded from https:// | ||
+ | |||
+ | - Install the Arduino IDE. | ||
+ | - Add the ESP boards: __**[[: | ||
+ | - Flash this Sketch on the target ESP. | ||
+ | - Open the Arduino serial monitor with 115200 baud. | ||
+ | - Put the WiFi router/ | ||
+ | - Wait for the IP Address in the serial monitor. | ||
+ | - Select on the Update tab in the WIO Dialog the WIO binary. | ||
+ | - Set the IP address and port on the Update tab. | ||
+ | - Start OTA. | ||
+ | - Ready to setup the rest of the WIO on the Maintenance tab. | ||
+ | |||
+ | Alternatively a mDNS browser can be used for point 4 and 6.\\ | ||
+ | | {{: | ||
+ | | Discovery | ||
+ | |||
+ | |||
+ | \\ | ||
+ | < | ||
+ | =====Files===== | ||
+ | File management for WIO CAN.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | < | ||
+ | =====I/O Mapping===== | ||
+ | {{: | ||
+ | |||
+ | :!: Setting I/O Mapping on an ESP32 board will make the I/O incompatible with existing GCA WIO modules. The alternative usage as listed between brackets will be set.\\ | ||
+ | |||
+ | The I2C, SPI and UART pins can not be changed and are only listed up for information purpose.\\ | ||
+ | |||
+ | __Connector mappings:__ | ||
+ | * [[: | ||
+ | * [[: | ||
+ | * [[: | ||
+ | |||
+ | ====Get==== | ||
+ | Request the active I/O mapping from the selected WIO.\\ | ||
+ | ====Set==== | ||
+ | Set the I/O mapping to values on this tab. A reboot is required.\\ | ||
+ | The settings are saved in the file system as "/ | ||
+ | ====Reset==== | ||
+ | Reset the I/O mapping to the defaults. A reboot is required.\\ | ||
+ | ====Reboot==== | ||
+ | Reboot the WIO to make the I/O mapping changes active.\\ | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | < | ||
+ | =====User CV===== | ||
+ | ====Interface==== | ||
+ | {{: | ||
+ | ===Preset=== | ||
+ | A list of defined user CVs.\\ | ||
+ | ===CV#=== | ||
+ | :!: If set out of range the WIO will crash! Use the Preset selection.\\ | ||
+ | ===Value=== | ||
+ | 16bit CV value.\\ | ||
+ | ===Get=== | ||
+ | Get the value from the WIO.\\ | ||
+ | ===Set=== | ||
+ | Set the value.\\ | ||
+ | ===Reset=== | ||
+ | Delete the '' | ||
+ | |||
+ | ====Location==== | ||
+ | {{ : | ||
+ | The User CVs are saved in the usrcv.bin file.\\ | ||
+ | Deleting this file will cause using the default values after the next reboot.\\ | ||
+ | |||
+ | ====CVs==== | ||
+ | |< >| | ||
+ | ^ CV# ^ Description ^ Range ^ Default ^ PicoW ^ ESP32 ^ ESP8266 ^ Remark ^ | ||
+ | | 0 | LED_ShowMode | 0=off, 1=on | 1 | | | | Show onboard LED flashing to show operation mode | | ||
+ | | 1 | User_Sound | 0=off, 1=on | 0 | | | | User sound over DAC | | ||
+ | | 2 | Bat_2S_Full | ||
+ | | 3 | Bat_2S_Empty | 0...4095 | | 2220 | 1670 | 480 | | ||
+ | | 4 | Bat_3S_Full | ||
+ | | 5 | Bat_3S_Empty | 0...4095 | | 2680 | 2570 | 690 | | ||
+ | | 6 | Bat_4S_Full | ||
+ | | 7 | Bat_4S_Empty | 0...4095 | | 3200 | 3090 | 760 | | ||
+ | | 8 | Servo_Min_Pulse | 500...1000 | 700 | | | | Check used servo types for the right value | | ||
+ | | 9 | Servo_Max_Pulse | 2000...2500 | 2300 | | | | Check used servo types for the right value | | ||
+ | | 10 | Display_Keypad_Line | 0...7 | 2 | | ||
+ | | 11 | Stepper_ISR_US | | 150 | | | | Number of micro seconds for timer interrupt | | ||
+ | | 12 | Stepper_ISR_Accel | | 50 | | | | Start/end delay (number of steps for accelerate and decelerate) -> range | | ||
+ | | 13 | Stepper_ISR_Accel_Step | | 15 | | | | Number of ticks before add/ | ||
+ | | 14 | User_altitude | | 104 | | | | https:// | ||
+ | |||
+ | |||
+ | Battery levels depends on board and used resistors.\\ | ||
+ | The ESP8266 battery range is 10bit: 0...1023\\ | ||
+ | ===Battery resistors=== | ||
+ | < | ||
+ | (+)--[100k]--(ain)--[33k]--(-) | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | =====Trouble Shooting===== | ||
+ | |||
+ | ====WiFi Connection (DE)==== | ||
+ | Im FritzBox WEB Oberfläche gibt es ein Möglichkeit um WiFi Verbindungen zu protokollieren: | ||
+ | FritzBox -> System -> Ereignisse -> WLAN\\ | ||
+ | Option //" | ||
+ | Danach der WIO versuchen lassen eine Verbindung auf zu bauen. Dann auf " | ||