Skip to content

Commit

Permalink
Adds link
Browse files Browse the repository at this point in the history
  • Loading branch information
apmiller108 committed Dec 30, 2024
1 parent cdc5fbf commit 75eb8b1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
7 changes: 5 additions & 2 deletions 20231125150622-turbo_streams.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:END:
#+title: Turbo Streams
#+date: 2023-11-25 15:06 PM
#+updated: 2024-05-21 08:49 AM
#+updated: 2024-12-30 15:36 PM
#+filetags: :rails:

[[https://turbo.hotwired.dev/handbook/streams][Turbo streams]] are part of the Turbo library, which itself is part of [[https://hotwired.dev/][Hotwire]].
Expand Down Expand Up @@ -170,7 +170,10 @@
#+end_src

*NOTE* the status ~see_other~ ([[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303][303]]) which is used in response to a PUT or POST
where the redirect is meant to be a GET. See also https://github.com/hotwired/turbo/issues/84
where the redirect is meant to be a GET.
See also
- https://github.com/hotwired/turbo/issues/84
- https://turbo.hotwired.dev/handbook/drive#redirecting-after-a-form-submission
* turbo_stream_from (turbo streams over WebSocket connection)
This method is used in the view templates to generate a
~turbo-cable-stream-source~ HTML tag with a couple data attributes describing
Expand Down
20 changes: 19 additions & 1 deletion 20241115143211-leds.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:END:
#+title: LEDs
#+date: 2024-11-15 14:32 PM
#+updated: 2024-11-19 15:23 PM
#+updated: 2024-12-03 12:51 PM
#+filetags: :electronics:arduino:

* Resistors
Expand All @@ -20,3 +20,21 @@ common resistor values:
| RED 1.8V, 20mA | 82 Ohm | 100 Ohm | 180 Ohm | 220 Ohm | 390 Ohm | 560 Ohm |
| WHITE 3.2V, 20mA | 5.6 Ohm | 27 Ohm | 100 Ohm | 150 Ohm | 330 Ohm | 470 Ohm |
| YELLOW 2V, 20mA | 68 Ohm | 100 Ohm | 180 Ohm | 220 Ohm | 390 Ohm | 560 Ohm |

Ohms Law: v = ir

1 red LED on 5v circuit
#+begin_src ruby
r = (5.0 - 1.8) / 0.02
#+end_src

#+RESULTS:
: 160.0

3 blue LEDs in parallel on 5v circuit
#+begin_src ruby
r = (5.0 - 3.2) / (3 * 0.02)
#+end_src

#+RESULTS:
: 30.000000000000004

0 comments on commit 75eb8b1

Please sign in to comment.