From 0910ed20a6f4173066fcf910dc3c6aa54c31105d Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 1 Nov 2022 01:31:49 -0400 Subject: [PATCH] code not cite --- .../blog/9999-11-01_neighbors-water-heater-automation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/blog/9999-11-01_neighbors-water-heater-automation.rst b/content/blog/9999-11-01_neighbors-water-heater-automation.rst index 1a9d92b..3ab7105 100644 --- a/content/blog/9999-11-01_neighbors-water-heater-automation.rst +++ b/content/blog/9999-11-01_neighbors-water-heater-automation.rst @@ -40,7 +40,7 @@ I found a youtube video on how to make a `SG90 run infinite in either direction I then modified the front end code a little bit. The new code on the back end was actually exactly the same, even though the effect was slightly different. -It would run on port 80, listen at `/` and `/angle`, but the angle here was more of direction and speed (a vector?). +It would run on port 80, listen at ``/`` and ``/angle``, but the angle here was more of direction and speed (a vector?). The way the servo was built, 160° was "Stop", higher than that was rotate clockwise, lower was rotate counter clockwise. I put three buttons on my page that would be "Lower" (150), "STOP" (160), and "Higher" (170). @@ -67,12 +67,12 @@ The green submit button sends the new desired temperature as a post. Server side, I was using a library called `AccelStepper `_. This I set some made up max speeds and steps per rotation, actual values TBD. -I added an endpoint called `/setTemperature` that takes in a temperature and sets a local temperature variable. +I added an endpoint called ``/setTemperature`` that takes in a temperature and sets a local temperature variable. From there, I calculate the temperature less 95, to find out how many degrees I need to increase by, for now I'm considering this rotations. -I then apply a multiplier (TBD also... there's a lot of these as you can see!) and call `stepper.moveTo()` and it actually feels like it's pretty accurate. +I then apply a multiplier (TBD also... there's a lot of these as you can see!) and call ``stepper.moveTo()`` and it actually feels like it's pretty accurate. -The endpoint `/initialize` runs `stepper.moveTo` with ten rotations CCW, and then resets the "known location" back to zero (this also runs on power on for now). +The endpoint ``/initialize`` runs ``stepper.moveTo`` with ten rotations CCW, and then resets the "known location" back to zero (this also runs on power on for now). In Action ~~~~~~~~~