Add tech items and botany

This commit is contained in:
Tyler Perkins 2021-09-23 13:54:24 -04:00
parent de36139245
commit 094223fd91
22 changed files with 314 additions and 13 deletions

0
botany/aquaponics.wiki Normal file
View File

View File

@ -13,16 +13,18 @@ _Ideas.md and Classes.md are encrypted, so these links will not work_
* [[Classes.md.gpg]] - My class info for Graduation
* [[splash]] - The splash page
== Tech notes ==
== [[tech/index|Tech notes]] ==
* [[tech/security|Security]] - Security tools and techniques
* [[tech/development|Development]] - Development tools
* [[tech/algorithms|Algorithms & Datastructures]] - Algorithms and Data structures
* [[tech/databases|Databases & SQL]] - Databases and SQL
* [[tech/os|Operating Systems Design]] - Basic building blocks of an OS
* [[tech/embedded|Embedded Programming]] - Embedded Systems like arduinos and (kinda) pi's
* [[electronics|Digital and Analog]] - Digital and analog electronics
* [[tech/misc|Misc]] - Miscellaneous tools
== Languages ==
== [[lang/index|Languages]] ==
* [[lang/C|C]]
* [[lang/C++|C++]]
@ -36,7 +38,22 @@ _Ideas.md and Classes.md are encrypted, so these links will not work_
* [[lang/Go|Go]]
* [[lang/sql|SQL]]
== School ==
== [[sci/index|Science]] ==
* [[sci/chemistry|Chemistry]]
* [[sci/physics|Physics]]
== [[botany/index|Botany]] ==
* [[botany/vegies|Vegies]]
* [[botany/hydroponics|Hydroponics]]
* [[botany/aquaponics|Aquaponics]]
== Local to GentooBox ==
=== School ===
_Use gf keybinding to open the link in vim_
- Digital Design
- ~/school/Advanced\ Digital\ Design
@ -51,7 +68,7 @@ _Use gf keybinding to open the link in vim_
- Human Biology
- ~/school/Human\ Biology
== Projects ==
=== Projects ===
_Use gf keybinding to open the link in vim_
- Dashboard
- ~/code/dashboard

6
tech/RISC.wiki Normal file
View File

@ -0,0 +1,6 @@
= RISC =
Reduced Instruction Set Computer. Most have [[pipelining]],
[[simple_addressing|Simple Addressing]], and low clock rates
[[index]]

View File

@ -31,4 +31,13 @@ Different ways to store and operate on data, with differing efficiency
* [[bucket|Bucket]]
* [[counting|Counting]]
[[../index]]
== Paradigms ==
* [[simple_recurison|Simple Recursion]]
* [[divide_and_conquer|Divide and Conquer]]
* [[dynamic_programming|Dynamic Programming]]
* [[greedy_algorithm|Greedy Algorithms]]
* [[brute_force|Brute Force]]
* [[randomized_algorithm|Randomized Algorithms]]
[[index]]

68
tech/arduino_nano.wiki Normal file
View File

@ -0,0 +1,68 @@
= Arduino Nano =
A very small arduino product, better for hobby embedding
see [[arduino_techniques|Programming Techniques]]
== Features ==
* ATMEL AVR ATmega328P microcontroller
* 8 bit @16Mhz
* 2Kbytes SRAM
* 32Kbytes flash
* 1Kbytes EEPROM
* Three on board LED's
* 20 IO pins
* 6 PWM and 6 ADC
== Notes ==
=== Memory ===
* AVR instructions are 16 or 32bits wide, therefore the flash is 16K x 16
* EEPROM has endurance of ~10000 write cycles
* Program counter is 14 bits wide
* First 32 memory locations (0x0000 - 0x001F) are registers
* Next 64 registers are standard IO (0x0020 - 0x005F)
* Next 160 are extended IO (0x0060 - 0x00FF)
* Everything else is SRAM (0x0100 - 0x08FF)
=== IO ===
* GPIO pins
* Have a Data Direction Register (DDR)
- Sets if data should go in or out
* Is kept up via a [[multiplexer]] to decide which bit
=== Pins ===
* PortC
- Port C data regiser
- 0x28
- R/W 8bits
* DDRC
- Port C data direction register
- 0x27
- R/W 8bits
* PINC
- Port C input pints address
- 0x26
- R 8bits
* PortB
- Port B data register
- 0x25
- R/W 8bits
* DDRB
- Port B data direction register
- 0x24
- R/W 8bits
* PINB
- Port B Input pins address
- 0x23
- R 8bit
Same pattern:
* PortD
- 0x2B - 0x29
[[embedded]]

View File

@ -0,0 +1,47 @@
= Arduino Programming Techniques =
This is mostly gonna be C++
== Accessing a GPIO line ==
{{{
//data direction register bit
unsigned char *portDDRB;
portDDRB = (unsigned char *) 0x24;
}}}
First we get an 8bit pointer and load it with a hard coded value of
the data-space address for that register
See [[arduino_nano#Pins]]
== Bit masks ==
{{{
#define BIT6_MASK 0x40 // 0100 0000
#define BIT5_MASK 0x20 // 0010 0000
*register_pointer = (*regiser_pointer) & (~BIT6_MASK);
*register_pointer = (*regiser_pointer) | BIT5_MASK;
}}}
For the first one we find the compilemnt then '&' it with the current
register values, which will only flip the selected bit.
For the second one we '|' it with the contents, setting a 1 in the 5th position
== Polling GPIO pins ==
repeatedly reading the value of the input pins and comparing the current value
to the previously-read value to determine if an external signal event has
occurred.
We can do this by comparing the last known value of the gpio pin with the
current one
See [[arduino_nano#Pins]]
[[embedded]]

0
tech/arduino_uno.wiki Normal file
View File

6
tech/buffer.wiki Normal file
View File

@ -0,0 +1,6 @@
= Buffer =
A Buffer is a flip flop that holds the current value, and can be read when a
signal is given to it. Has an input, output, and swith to read from it.
[[electronics]]

View File

@ -10,3 +10,5 @@ network, with caching and other optimizations.
== SQL ==
See [[../lang/sql]]
[[index]]

View File

@ -18,4 +18,4 @@
[[../index|Index]]
[[index]]

15
tech/electronics.wiki Normal file
View File

@ -0,0 +1,15 @@
= Electronics =
Both digital and analog components
= Combinational =
* [[multiplexer|Multiplexer]]
= Sequential =
* [[buffer|Buffer]]
[[index]]

24
tech/embedded.wiki Normal file
View File

@ -0,0 +1,24 @@
= Embedded Systems =
Systems that are in other things, and therefore the computer is hidden from the
user, sometimes so that they don't even know there is a computer
== Arduino ==
* https://www.microchip.com/en-us/product/ATmega328
* [[RISC]] Processor type
=== Line of products ===
* [[arduino_nano|Arduino Nano]]
* [[arduino_uno|Arduino Uno]]
=== Programming ===
* [[../lang/C|C]]
* [[../lang/C++|C++]]
* [[arduino_techniques|Techniques]]
[[index]]

25
tech/hash_table.wiki Normal file
View File

@ -0,0 +1,25 @@
= Hash table =
The almighty O(1) accessing data structure. Uses a hash function so really its
only as fast as your hash function. Comes in associate and non-associate
flavors.
== Good For ==
* Crazy fast [[look]] ups
== Bad for ==
* Non basic data types (unless you create a really good hash function)
== Optimize ==
One of the ways I like to use these is to hold pointers. That's basically the
idea behind a LRUCache and other types of data-structure caches. They are also
usually an array of linked list buckets. If you can get a perfect hash function
(gperf) then its a wonderful choice, as it will never collide and always only
take O(1) time. Also if you're willing to test a set of common sets of data, you
can choose to not have a linked list set of buckets, however depending on how
you deal with collisions it can get very bad very fast.
[[algorithms]]

15
tech/index.wiki Normal file
View File

@ -0,0 +1,15 @@
= Tech =
Everything dealing with my awful addiction to computers
== Major sections ==
* [[security|Security]] - Security tools and techniques
* [[development|Development]] - Development tools
* [[algorithms|Algorithms & Datastructures]] - Algorithms and Data structures
* [[databases|Databases & SQL]] - Databases and SQL
* [[os|Operating Systems Design]] - Basic building blocks of an OS
* [[embedded|Embedded Programming]] - Embedded Systems like arduinos and (kinda) pi's
* [[electronics|Digital and Analog]] - Digital and analog electronics
* [[misc|Misc]] - Miscellaneous tools
[[../index]]

View File

@ -2,4 +2,4 @@
Misc. Stuff relating to computers and tech in general
[[../index]]
[[index]]

32
tech/multiplexer.wiki Normal file
View File

@ -0,0 +1,32 @@
= Multiplexer =
Combines several signals into one
Consists of
* An output
* _n_ inputs,
* log,,2,,(_n_) selectors
This alone allows us using the selectors, to choose which input
This is best shown with a 2 input multiplexer, which only needs 1 selector
{{{
in0 |---|
----| |Out
in1 | |---
----| |
|---|
|
sel |
}}}
| sel | output |
|-----|--------|
| 0 | in0 |
| 1 | in1 |
And thats all there is to it. This scales up with several inputs,
several selectors, and one output
[[electronics]]

View File

@ -1,5 +1,3 @@
[[index]]
= nmap =
A great tool for scanning hosts over the network
@ -45,3 +43,4 @@ A great tool for scanning hosts over the network
- Usage: -p<1-65535>
- Scans specified ports only. use -p- to scan every port
[[index]]

View File

@ -3,4 +3,8 @@
The primary 'program' running on a machine that allows a user to run several
programs at once, manages drivers and hardware abstraction, etc
[[../index]]
== CPUs ==
* [[RISC]]
[[index]]

View File

@ -12,5 +12,10 @@ from the back
* Everything else
== Optimize ==
Only implement this as a linked list, as all insert and removal (which is the
only operation queues have really), will be in O(1) time. Really fast, just no
cache optimizations, but its _usually_ a valid trade-off
[[algorithms]]

View File

@ -4,7 +4,7 @@ Tools useful for security, either offensive or defensive
== Reconnaissance ==
* [[recon/nmap|nmap]] - port scanner
* [[nmap|nmap]] - port scanner
@ -13,4 +13,4 @@ Tools useful for security, either offensive or defensive
[[../index.wiki]]
[[index.wiki]]

21
tech/skip_list.wiki Normal file
View File

@ -0,0 +1,21 @@
= Skip List =
A more specialized version of a list with log(n) search, insertion, and
deletion (on average).
== Good For ==
* Keeping an order with fast lookups and removals
== Bad For ==
* Space constrained enviroments (nlogn space usage)
== Notes ==
Honestly things like a B-Tree are better alternatives, but sometimes you need a
list like this.
[[algorithms]]

View File

@ -8,9 +8,15 @@ like
* Keeping an order of things added
== Bad For ==
* Everything else
== Optomize ==
You can make this either just an array with a pointer to the top of the stack,
or as a big single linked list that keeps track of the head. Use the array when
you know the max number of elements, otherwise use a linked list. If caching is
a concern, use the array version.
[[algorithms]]