users:dagnall53:troubleshooting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
users:dagnall53:troubleshooting [2019/02/17 12:26] – [Arduino Compile errors] dagnall53 | users:dagnall53:troubleshooting [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Index | ||
- | * [[: | ||
- | * [[https:// | ||
- | * [[: | ||
- | * [[: | ||
- | |||
- | |||
- | |||
- | ====== Check that the Node is actually connected ====== | ||
- | |||
- | If you have Rocrail setup, and one of my WiRocS nodes working, then when you select {rocrail}Programming/ | ||
- | (getting this far sometimes takes a few restarts of Rocrail if you are changing things like the MQTT IP addresses...) | ||
- | |||
- | ID Location Vendor | ||
- | 28 0 Public Domain and DIY Decoders | ||
- | |||
- | |||
- | Here the Node is at real IP address xxx.xxx.0.22 but has a Rocrail ID of 28, and a UID name of "Wood St". This module is using revision 13 of my code. | ||
- | |||
- | IF this is not working it may be that your node is not connected properly to your wifi. Please start it using the arduino interface and it should help you identify the problem using the arduino terminal. | ||
- | |||
- | ====== Check that the ports on the node are set correctly ====== | ||
- | |||
- | If you get this far, you should then be able to check and see the various Port settings for this ESP module. | ||
- | |||
- | Typically for an INPUT on PORT 4 using a hall effect switch, | ||
- | |||
- | Set Type to " | ||
- | I do not set Toggle. { I do not think my code even recognizes toggle, but I could add it later} | ||
- | |||
- | {**IMPORTANT NOTE** The Pi03 “Channel” Setup options to make a pin a PWM Output or SERVO Output (“Blink” or “Servo”) actually take priority over the Pi02 “Port” Type/ | ||
- | |||
- | Having set up a port as an input, test this with a magnet and you should see the sensor icon (with the interface set to address 28,Address 4,type sensor) | ||
- | |||
- | In the rocrail controller viewport, rocrail should report something like this: | ||
- | |||
- | 10:58:19 sensor report 28:4 off code= load=0 | ||
- | 10:58:18 sensor report 28:4 on code= load=0 | ||
- | |||
- | The code does include a degree of debounce logic, but its best to try it to explore how it works with your sensors. | ||
- | |||
- | ====== Use the DEBUG MQTT messages ====== | ||
- | |||
- | To help testing, my code sends special MQTT debug messages to " | ||
- | In command prompt (switch to your mosquitto directory) and use the command " | ||
- | (assuming your mosquitto is at 192.168.0.11 | ||
- | and you should see something like this... | ||
- | {{: | ||
- | |||
- | For this example, I started the Debug Monitor and then re-started two nodes. They login to the " | ||
- | Every time they get the RocNet Time synchronization message, they send a simple debug message, allowing confirmation that they are connected.\\ | ||
- | This is a very useful way of checking all your Esp devices are actually connected. For this reason I usually run the debug all the time in the background so I can check if something has lost connection. In comparison to the old code, at V3 I added a signal strength monitor, showing how strong(or weak) the WiFi signal is. In this example its exceptionally low, at below -90 dB. The two nodes were in my study, yet managed to connect to the SHED, which is in the garden, about 30m away. | ||
- | |||
- | ====== Set the sensors so they work with momentary inputs from the hall sensors ====== | ||
- | |||
- | Now, using the interface in Rocrail, | ||
- | | ||
- | Consider this very simple track with two terminal type sidings and a single point(/ | ||
- | |||
- | [Station Back] Sensor{SR} ... Point Thrown | ||
- | |||
- | [Station Front] Sensor {SF}... Point Straight ------ Main Route. | ||
- | |||
- | The " | ||
- | |||
- | When the sensor detect the train, the sensor will momentarily go green, and Rocrail will know the train is now in that block. | ||
- | |||
- | ====== Make sure you have Input/ | ||
- | |||
- | As noted earlier, the Pi03 " | ||
- | |||
- | So, If you have any of the " | ||
- | (Note: But it will report " | ||
- | |||
- | |||
- | ====== Make sure the Rocrail settings are correct ====== | ||
- | |||
- | Setting the Switch Interface for the points is very similar to setting the inputs, except that the settings for a port (example here is PORT 7) to be a servo output are as follows:\\ | ||
- | * Pi02 Port setup for PORT 7 set to OUTPUT | ||
- | * Pi03Channel Setup for PORT 7: Left and right set the servo positions. | ||
- | * (I would set left and right steps to " | ||
- | * Set the " | ||
- | * Set Delay*10ms to " | ||
- | |||
- | Providing you have placed a point/ | ||
- | * Unordered List Item{General: | ||
- | * Interface InterfaceD {whatever you called your MQTT controller} | ||
- | * Bus : {28 in this example} | ||
- | * Address {7 in this exmple for PORT 7 with a servo connected} | ||
- | * And Checked {Single Gate}. | ||
- | |||
- | With these settings Rocrail should be able to change the switch/ | ||
- | |||
- | The debug monitor should show something like this | ||
- | |||
- | < | ||
- | < | ||
- | |||
- | I think if you can get all this working, you should be able to make what you want work, and experiment with the other settings, to get things like the PWM controls and blinking working for lights on the track... | ||
- | |||
- | ===== Arduino Compile errors===== | ||
- | I have seen arduino compile erors such as \\ | ||
- | " | ||
- | ' | ||
- | |||
- | Multiple libraries were found for " | ||
- | Used: C: | ||
- | Not used: C: | ||
- | Multiple libraries were found for " | ||
- | Used: C: | ||
- | Not used: C: | ||
- | exit status 1 | ||
- | Error compiling for board NodeMCU 1.0 (ESP-12E Module). | ||
- | Archiving built core (caching) in: | ||
- | C: | ||
- | VTable_flash, | ||
- | UploadSpeed_115200_3f447b7f4ff4321d67996d55e2879ce0.a" | ||
- | |||
- | But usually (!) although it complains, the code eventually compiles and uploads\\ | ||
- | Usually it compiles fine the second time (!) around\\ | ||
- | Sometimes the com port gets " | ||
- | |||
- | |||
- | |||
- | good luck |
users/dagnall53/troubleshooting.1550402806.txt.gz · Last modified: 2019/02/17 12:26 by dagnall53