Skip to content

Commit b6c0368

Browse files
committed
Merge branch 'sphinx' of https://github.com/flash62au/dcc-ex.github.io into sphinx
2 parents 6b5a985 + 6172221 commit b6c0368

11 files changed

Lines changed: 92 additions & 52 deletions

File tree

1.65 MB
Loading

docs/ex-ioexpander/supported-devices.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -233,25 +233,25 @@ Numerous I/O pins are connected to other devices or perform multiple functions w
233233
:header-rows: 1
234234

235235
Vpin,Pin,Digital,Analogue,PWM,Vpin,Pin,Digital,Analogue,PWM
236-
800,PC10,Y,N,N,820,PC7,Y,N,N
236+
800,PC10,Y,N,N,820,PC7,Y,N,Y
237237
801,PC12,Y,N,N,821,PA9,Y,Y,Y
238-
802,PA15,Y,N,N,822,PA8,Y,N,Y
239-
803,PB7,Y,N,N,823,PB10,Y,N,Y
240-
804,PC15,Y,N,Y,824,PB4,Y,N,N
241-
805,PC2,Y,N,Y,825,PB5,Y,N,Y
238+
802,PA15,Y,N,Y,822,PA8,Y,N,Y
239+
803,PB7,Y,N,Y,823,PB10,Y,N,Y
240+
804,PC15,Y,N,N,824,PB4,Y,N,Y
241+
805,PC2,Y,N,N,825,PB5,Y,N,Y
242242
806,PC3,Y,N,N,826,PB3,Y,N,Y
243-
807,PC11,Y,Y,Y,827,PA10,Y,N,Y
244-
808,PD2,Y,Y,Y,828,PC8,Y,N,N
245-
809,PA0,Y,Y,N,829,PC6,Y,N,Y
246-
810,PA1,Y,Y,Y,830,PC5,Y,Y,Y
247-
811,PA4,Y,Y,N,831,PA12,Y,N,Y
248-
812,PB0,Y,Y,N,832,PA11,Y,N,Y
249-
813,PC1,Y,Y,N,833,PB12,Y,N,Y
250-
814,PC0,Y,Y,N,834,PB2,Y,N,Y
243+
807,PC11,Y,Y,N,827,PA10,Y,N,Y
244+
808,PD2,Y,Y,N,828,PC8,Y,N,N
245+
809,PA0,Y,Y,Y,829,PC6,Y,N,Y
246+
810,PA1,Y,Y,Y,830,PC5,Y,Y,N
247+
811,PA4,Y,Y,N,831,PA12,Y,N,N
248+
812,PB0,Y,Y,Y,832,PA11,Y,N,Y
249+
813,PC1,Y,Y,N,833,PB12,Y,N,N
250+
814,PC0,Y,Y,N,834,PB2,Y,N,N
251251
815,PC9,Y,N,Y,835,PB1,Y,N,Y
252252
816,PA5,Y,N,Y,836,PB15,Y,N,Y
253253
817,PA6,Y,N,Y,837,PB14,Y,N,Y
254-
818,PA7,Y,Y,N,838,PB13,Y,N,Y
254+
818,PA7,Y,Y,Y,838,PB13,Y,N,Y
255255
819,PB6,Y,Y,Y,839,PC4,Y,Y,N
256256

257257
|

docs/exrail/exrail-command-reference.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,15 @@ For a good example of this refer to :ref:`exrail/tips:realistic turnout sequence
15391539
|_| > **description** - The description that will be assigned to the turnout/point, or |BR|
15401540
|_| > *HIDDEN* - keyword - if used instead of the "description" the Turnout/point will not appear in the lists sent to throttle/controllers |BR|
15411541

1542+
.. collapse:: For example: (click to show)
1543+
1544+
.. code-block:: cpp
1545+
1546+
TURNOUT(100, 26, 0, "Coal Yard") // DCC accessory turnout at linear address 101.
1547+
PIN_TURNOUT(101, 164, "Switching Yard") // Pin turnout on an MCP23017 I/O expander module.
1548+
SERVO_TURNOUT(102, 102, 400, 100, Slow, HIDDEN) // A servo turnout on a PCA9685 servo module that is hidden from throttles.
1549+
VIRTUAL_TURNOUT(103, "Lumber Yard") // A virtual turnout which will trigger an automation sequence when CLOSE or THROW is sent.
1550+
15421551
|hr-dashed|
15431552

15441553
.. _ifclosed:
@@ -1609,15 +1618,6 @@ Throws a defined turnout/point.
16091618
*Parameters:* |BR|
16101619
|_| > **turnout_id** - The id of the turnout/point to throw |BR|
16111620

1612-
.. collapse:: For example: (click to show)
1613-
1614-
.. code-block:: cpp
1615-
1616-
TURNOUT(100, 26, 0, "Coal Yard") // DCC accessory turnout at linear address 101.
1617-
PIN_TURNOUT(101, 164, "Switching Yard") // Pin turnout on an MCP23017 I/O expander module.
1618-
SERVO_TURNOUT(102, 102, 400, 100, Slow, HIDDEN) // A servo turnout on a PCA9685 servo module that is hidden from throttles.
1619-
VIRTUAL_TURNOUT(103, "Lumber Yard") // A virtual turnout which will trigger an automation sequence when CLOSE or THROW is sent.
1620-
16211621
|hr-dashed|
16221622

16231623
.. _toggle_turnout:

docs/reference/downloads/documents.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ You can have the command references for |DCC-EX| shown through the Script Output
6363

6464
.. rst-class:: dcclink
6565

66-
`DCC-EX + JMRI Custom GUI Buttons SetUp </_static/documents/DCC-EX_4.1_JMRI_Script+Button_Instructions.pdf>`_
66+
`DCC-EX + JMRI Custom GUI Buttons SetUp </_static/documents/DCC-EX_4.1_JMRI_Script%20Button_Instructions.pdf>`_
6767

6868
.. rst-class:: clearer
6969

docs/reference/hardware/microcontrollers/esp32.rst

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ From top to bottom the pins are: `IO0`, `5V` (incorrectly labelled `IOREF` on th
104104
:scale: 10%
105105

106106

107-
Using an Arduino Motor Shield R3 or clone
108-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107+
Using an Arduino Motor Shield R3
108+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109109
To avoid damaging the ESP32's analog inputs, the `IOREF` pin on must be bent outwards or cut so it will not go into the ESPDUINO-32 socket. Then use a jumper from the `3.3v` pin to `IOREF` on the |motor shield| itself.
110110

111111
For DCC current sensing bend or cut the `A0` and `A1` pins because by default they are connected to `GPIO2` and `GPIO4` on the ESP32 which are not useable at the same time as WiFi.
@@ -115,6 +115,27 @@ Instead, on the top of the |motor shield| connect `A0` to `A2` and `A1` to `A3`
115115
:alt: MotorShield configuration for ESP32
116116
:scale: 50%
117117

118+
Additional information on the use of L298 Clone motor shields
119+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120+
Bend the IOREF pin and jumper to the 3.3v pin, as is done for the Genuine Arduino Motor Shield R3. |BR|
121+
For current sensing, bend the A0 and A1 pins. Current sensing will use A2 and A3, but clone motor shields require modifications. |BR|
122+
|_| > Add voltage divider resistors. |BR|
123+
|_| |_| Track A - - 5k/20k MAIN |BR|
124+
|_| |_| |_| |_| 5k - A0-A2 |BR|
125+
|_| |_| |_| |_| 20k - GND-A2 |BR|
126+
|_| |_| Track B - - 5K/20K/100K PROG |BR|
127+
|_| |_| |_| |_| 5k - A1-A3 |BR|
128+
|_| |_| |_| |_| 20k - GND-A3 |BR|
129+
|_| |_| |_| |_| 100k - 3v3-A3 |BR|
130+
|_| > The voltage divider resistor circuit is also utilizing the Schottky diodes present on pins A2 and A3 to limit ADC input voltage. |BR|
131+
|_| > Note: the 100k resistor provides a voltage boost, which will result in overcurrent issues on the
132+
programming track. You can use <D PROGBOOST> to forego the 250mA trip current, or update the
133+
code in MotorDriver.h
134+
135+
.. image:: /_static/images/esp32/espduino-32-L298-voltage-divider.png
136+
:alt: L298 motor shield - voltage divider resistors
137+
:scale: 15%
138+
118139
Using a |DCC-EX| EX-MotorShield8874
119140
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120141

@@ -134,16 +155,17 @@ Building DCC-EX for ESP32
134155

135156
The easiest way of building DCC-EX for the ESP32 is via EX-Installer by selecting the ESP32 option. Click here for :doc:`EX-Installer installation instructions </ex-commandstation/installer-diy>`.
136157

137-
Adding ESP32 support to the Arduino IDE
138-
----------------------------------------
139-
140-
In order to compile for the Espressif ESP32 platforms, you will need to add the board definitions to the |Arduino IDE|. To do this, follow the instructions on the `official Espressif guide <https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide>`_.
141-
142158
Adding ESP32 support to VS Code and PlatformIO
143159
----------------------------------------------
144160

145161
When using VS Code and PlatformIO it will auto-configure from the entry in the platformio.ini file when you select the ESP32 target to be built.
146162

147-
.. note::
148-
The ESP32 board package version 2.0.17 is required.
163+
Adding ESP32 support to the Arduino IDE
164+
----------------------------------------
149165

166+
In order to compile for the Espressif ESP32 platforms, you will need to add the board definitions to the |Arduino IDE|. To do this, follow the instructions on the `official Espressif guide <https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide>`_.
167+
168+
.. note::
169+
170+
ESP32 Espressif boards package version 2.0.17 is required. |BR|
171+
Select board: ESP32 Dev module

docs/reference/hardware/microcontrollers/microcontrollers.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,13 @@ From top to bottom the pins are: `IO0`, `5V` (incorrectly labelled `IOREF` on th
367367
:scale: 10%
368368

369369

370-
Using an Arduino Motor Shield R3 or clone
371-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
370+
Using an Arduino Motor Shield R3
371+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
372372
To avoid damaging the ESP32's analog inputs, the `IOREF` pin on must be bent outwards or cut so it will not go into the ESPDUINO-32 socket. Then use a jumper from the `3.3v` pin to `IOREF` on the |motor shield| itself.
373373

374-
For DCC current sensing bend or cut the `A0` and `A1` pins because by default they are connected to `GPIO2` and `GPIO4` on the ESP32 which are not useable at the same time as WiFi.
375-
Instead, on the top of the |motor shield| connect `A0` to `A2` and `A1` to `A3` via jumpers. This will then automatically work when you select STANDARD_MOTOR_SHIELD as the MotorShield in config.h because the definition is in place when ESP32 is selected as the build target.
374+
For DCC current sensing bend or cut the `A0` and `A1` pins because by default they are connected to `GPIO2` and `GPIO4` on the ESP32 which are not useable at the same time as WiFi. |BR|
375+
Instead, on the top of the |motor shield| connect `A0` to `A2` and `A1` to `A3` via jumpers. This will then automatically work when you select STANDARD_MOTOR_SHIELD as the MotorShield in config.h because the definition is in place when ESP32 is selected as the build target. |BR|
376+
> Note: L298 Clone motor shields require a voltage divider circuit. :ref:`Link to further detail. <reference/hardware/microcontrollers/esp32:Additional information on the use of L298 Clone motor shields>`
376377

377378
.. image:: /_static/images/esp32/espduino-32-motor-shield-fritzing.png
378379
:alt: MotorShield configuration for ESP32

docs/reference/hardware/motorboards/ex-motor-shield-8874.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ Stacking EX-MotorShield8874s
204204

205205
This is **definitely** advanced Tinkerer/Engineer level work. Do **not** attempt it without some confidence you know what you are doing electronically. Future revisions of the EX-MotorShield8874 will look at alternative ways to expand the number of DCC districts.
206206

207-
This article covers both stacking an Arduino Motor Shield R3 (or clone) and an EX-MotorShield8874, and stacking two EX-MotorShield8874s.
207+
This article covers both stacking an Arduino Motor Shield R3 and an EX-MotorShield8874, and stacking two EX-MotorShield8874s. |BR|
208+
> Note that L298 clone motor shields can be used on 5V Mega, etc., but require modification for use with 3.3V ESP32-WROOM and Nucleo-F4. :ref:`Link to further detail. <reference/hardware/microcontrollers/esp32:Additional information on the use of L298 Clone motor shields>`
208209

209210
Stacking an Arduino Motor Shield R3 and EX-MotorShield8874
210211
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

docs/reference/software/command-summary-consolidated.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,7 @@ To monitor one or more Arduino pins for sensor triggers, first define/edit/delet
20412041

20422042
*Parameters:* |BR|
20432043
|_| > **id:** identifier of the Sensor (0-32767) (You pick the ID & they are shared between Turnouts, Sensors and Outputs) |BR|
2044-
|_| > **vpin:** vpin of the input to be controlled by the sensor object For Arduino input pins, this is the same as the digital pin number. For servo inputs and I/O expanders, it is the pin number defined for the HAL device (if present), for example 164-179 for pins on the first MCP23017 GPIO expander module, and 180-195 for the second MCP23017 module.|BR|
2044+
|_| > **vpin:** vpin of the input to be controlled by the sensor object For Arduino input pins, this is the same as the digital pin number. For servo inputs and I/O expanders, it is the pin number defined for the HAL device (if present), for example 164-179 for pins on the first MCP23017 GPIO expander module, and 180-195 for the second MCP23017 module. |BR|
20452045
|_| > **pullup:** one of |BR|
20462046
|_| |_| |_| |_| • 1=Use pull-up resistor ACTIVE=LOW |BR|
20472047
|_| |_| |_| |_| • 0=don't use pull-up resistor ACTIVE=HIGH
@@ -2121,7 +2121,7 @@ Outputs (Configuring the EX-CommandStation)
21212121
-------------------------------------------
21222122

21232123
.. contents:: In This Section
2124-
:depth: 4
2124+
:depth: 5
21252125
:local:
21262126
:class: in-this-section
21272127

@@ -2132,7 +2132,21 @@ Definitions and state (ACTIVE/INACTIVE) for pins are retained in EEPROM and rest
21322132
The default is to set each defined pin to active or inactive according to its restored state.
21332133
However, the default behaviour can be modified so that any pin can be forced to be either active or inactive upon power-up regardless of its previous state before power-down.
21342134

2135-
To have |EX-CS| utilise one or more Arduino pins as custom outputs, first define/edit/delete output definitions using the following variation of the ``<Z>`` command:
2135+
To have |EX-CS| utilise one or more Arduino pins as custom outputs, first define/edit/delete output definitions using the following variation of the ``<Z>`` command, or the lowercase ``<z>`` command can be used with no pre-definition required.
2136+
2137+
|hr-dashed|
2138+
2139+
.. _native-command-lower-z-vpin-activate:
2140+
2141+
``<z vpin> or <z -vpin>`` - Control an output pin; no setup required
2142+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2143+
2144+
*Parameters for the lowercase z command:* |BR|
2145+
|_| > **vpin:** the pin or vpin number of the output |BR|
2146+
|_| |_| |_| |_| • positive vpin = ACTIVE/HIGH |BR|
2147+
|_| |_| |_| |_| • negative vpin = INACTIVE/LOW
2148+
2149+
*Response:* N/A
21362150

21372151
|hr-dashed|
21382152

docs/trackmanager/technical-details.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ A simplified representation of what the dual (PWM) signals might look like throu
7272
Additional Notes
7373
================
7474

75-
This is not zero (0) stretching. We do not support the zero stretching address function, found on Digitrax and Lenz command Stations on purpose. The constant dual DCC electrical signal may damage certain types of older DC motors if left on for a long time.|BR| **So never put a DC locomotive on a DCC track.**
75+
This is not zero (0) stretching. We do not support the zero stretching address function, found on Digitrax and Lenz command Stations on purpose. The constant dual DCC electrical signal may damage certain types of older DC motors if left on for a long time. |BR| **So never put a DC locomotive on a DCC track.**
7676

7777
Unlike Digitrax and Lenz 0 Zero stretching DCC (PWM) signal which leaves the engine lit up and humming loudly with the throttle and engine at 0 speed, because it is receiving a Dual DCC(PWM) aka AC signal, while the |EX-CS| TrackManager is dead quiet and at rest at 0 speed.
7878

local_deploy.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
# runs only on haba's deploy:
77
type -p afslog > /dev/null && afslog
8+
type -p klist > /dev/null && klist
9+
test -f `echo $KRB5CCNAME | sed s/FILE://1` && ls -l `echo $KRB5CCNAME | sed s/FILE://1`
810

911
# here is the real start
1012
##########################
@@ -18,22 +20,22 @@ fi
1820

1921
# activate prepared venv
2022
. venv/bin/activate
23+
set -x
24+
while sleep 60 && touch ../run/timestamp; do
2125

22-
while sleep 1; do
26+
git fetch --dry-run 2>&1 | cut -c 26- | awk ' $2 == "->" && $1 != "gh-pages" { print "touch ../branch/"$1"/update-me"}' | bash
2327

24-
git fetch --dry-run 2>&1 | awk ' $4 != "" { print "touch ../branch/"$2"/update-me"}' | bash
25-
26-
for DIR in ../branch/*/update-me ; do
28+
for DIR in `ls -d ../branch/*/update-me 2>/dev/null` ; do
2729
BRANCH=`echo $DIR | awk -F/ '{print $3}'`
2830
#BRANCH=`git branch | egrep '^\*' | sed 's/. //1'`
29-
git checkout "$BRANCH"
30-
git pull
31-
pip3 install -r requirements.txt || exit 255
32-
sphinx-build -M html docs/. "../branch/$BRANCH/" -W --keep-going 2>&1 | cat > "../branch/$BRANCH/lastrun.log"
31+
git checkout "$BRANCH" 2>&1 | cat > "../branch/$BRANCH/lastrun.log"
32+
git pull 2>&1 | cat >> "../branch/$BRANCH/lastrun.log"
33+
pip3 install -r requirements.txt 2>&1 | cat >> "../branch/$BRANCH/lastrun.log"
34+
sphinx-build -M html docs/. "../branch/$BRANCH/" -W --keep-going --write-all --fresh-env 2>&1 | cat >> "../branch/$BRANCH/lastrun.log"
3335
rm "../branch/$BRANCH/update-me"
3436
done
3537
# still in testing, break here
36-
break
38+
# break
3739
done
3840

3941
#deactivate venv

0 commit comments

Comments
 (0)