diff --git a/books/beaglebone-cookbook/05tips/tips.rst b/books/beaglebone-cookbook/05tips/tips.rst index 11feb0db049130724af81d5801c7ddee8b36fddd..24d03aaee03bcba50be4473d92be2cca6977c05b 100644 --- a/books/beaglebone-cookbook/05tips/tips.rst +++ b/books/beaglebone-cookbook/05tips/tips.rst @@ -528,8 +528,8 @@ Just enter the following command: You are now in nano (:ref:`tips_nano_fig`). You can't move around the screen using the mouse, so use the arrow keys. The bottom two lines of the screen -list some useful commands. Pressing ˄G (Ctrl-G) will display more useful -commands. ˄X (Ctrl-X) exits nano and gives you the option of saving the file. +list some useful commands. Pressing ^G (Ctrl-G) will display more useful +commands. ^X (Ctrl-X) exits nano and gives you the option of saving the file. .. _tips_nano_fig: diff --git a/books/beaglebone-cookbook/09capes/capes.rst b/books/beaglebone-cookbook/09capes/capes.rst index 0e38696e0c2efdd75ac20a7afbf84e98bdd9f2a2..9332d242939886cbd00ed6f7f0c5d6e5f7b1334c 100644 --- a/books/beaglebone-cookbook/09capes/capes.rst +++ b/books/beaglebone-cookbook/09capes/capes.rst @@ -557,11 +557,11 @@ Testing the quickBot motors interface (quickBot_motor_test.js) <2> Make other simple parameters variables. Again, this makes it easy to update them. When creating this test, I found that the PWM frequency to drive the motors needed to be relatively low to get over the kickback shown in :ref:`quickBot_motor_kickback`. I also found that I needed to get up to about 70 percent duty cycle for my circuit to reliably start the motors turning. - <3> Use a simple variable such as `state` to keep track of the test phase. This is used in a `switch` statement to jump to the code to configure for that test phase and updated after configuring for the current phase in order to select the next phase. Note that the next phase isn’t entered until after a two-second delay, as specified in the call to `setTimeout()`. + <3> Use a simple variable such as `state` to keep track of the test phase. This is used in a `switch` statement to jump to the code to configure for that test phase and updated after configuring for the current phase in order to select the next phase. Note that the next phase isn't entered until after a two-second delay, as specified in the call to `setTimeout()`. <4> Perform the initial setup of all the pins. - <5> The first time a PWM pin is used, it is configured with the update frequency. It is important to set this just once to the right frequency, because other PWM channels might use the same PWM controller, and attempts to reset the PWM frequency might fail. The <code>pinMode()</code> function doesn’t have an argument for providing the update frequency, so use the <code>analogWrite()</code> function, instead. You can review using the PWM in :ref:`motors_servo`. + <5> The first time a PWM pin is used, it is configured with the update frequency. It is important to set this just once to the right frequency, because other PWM channels might use the same PWM controller, and attempts to reset the PWM frequency might fail. The <code>pinMode()</code> function doesn't have an argument for providing the update frequency, so use the <code>analogWrite()</code> function, instead. You can review using the PWM in :ref:`motors_servo`. <6> `updateMotors()` is the test function for the motors and is defined after all the setup and initialization code. The code calls this function every two seconds using the `setTimeout()` JavaScript function. The first call is used to prime the loop.