summaryrefslogtreecommitdiffhomepage
path: root/resources/pug
diff options
context:
space:
mode:
authorCamil Staps2017-03-18 16:25:19 +0100
committerCamil Staps2017-03-18 16:25:19 +0100
commit279e8273d381e5b67920e6bf47405dba18c90a35 (patch)
treed0fe6675b2e5465bc9baea65f1cd6fc2a94ba8a5 /resources/pug
parentAdded note about bands (diff)
Move to pug instead of jade
Diffstat (limited to 'resources/pug')
-rw-r--r--resources/pug/finals/ham/cw-decoder.pug77
-rw-r--r--resources/pug/finals/ham/index.pug16
-rw-r--r--resources/pug/finals/index.pug132
-rw-r--r--resources/pug/include/foot.pug0
-rw-r--r--resources/pug/include/head.pug10
-rw-r--r--resources/pug/include/layout-ham.pug9
-rw-r--r--resources/pug/include/layout-sidebar.pug27
-rw-r--r--resources/pug/include/layout.pug27
-rw-r--r--resources/pug/include/mixins.pug3
9 files changed, 301 insertions, 0 deletions
diff --git a/resources/pug/finals/ham/cw-decoder.pug b/resources/pug/finals/ham/cw-decoder.pug
new file mode 100644
index 0000000..b4285eb
--- /dev/null
+++ b/resources/pug/finals/ham/cw-decoder.pug
@@ -0,0 +1,77 @@
+extends /layout-ham.pug
+
+block prepend menu
+ - var page = 'cw-decoder'
+ - var sections = ['Porting to PIC', 'Finishing', 'Future plans']
+
+block subtitle
+ | CW Decoder
+block subtitleDate
+ | January 2017
+
+block subtitle-right
+ +githubIconLink('camilstaps/CWDecoder')
+
+block page
+ h4 Introduction
+ p.
+ We discuss a small PIC-based CW decoder, a great help for a beginning ham.
+ The base is taken from Budd Churchward WB7FHC's #[a(href='http://www.mypetarduino.com/ReadCode/readCode.01.html') Arduino-based decoder].
+ My own source code, for a PIC16F88, is #[a(href='https://github.com/camilstaps/CWDecoder') on GitHub].
+
+ h4 Porting to PIC
+ p.
+ While the project is great, I was unable to resign myself to use an Arduino.
+ Arduino is nice for prototyping, but too many people use it as an end product, wasting space and resources.
+ Worst of all, they fail to learn principles of electrical engineering and programming on minimal architectures.
+ p.
+ Hence, I decided to port the project to a PIC microcontroller.
+ PIC is a wide range of microcontrollers developed by #[a(href='http://microchip.com') Microchip].
+ For this project, a simple 8-bit chip is more than enough.
+ The only thing we need to look out for is that the clock is fast enough.
+ I went with the #[a(href='http://www.microchip.com/wwwproducts/en/pic16f88') PIC16F88] which has 5MIPS, for the simple reason that I had it in stock.
+ Anything will do.
+ p.
+ Porting the Arduino code (which is a C++ dialect) to C is relatively easy.
+ The only complication is the <code>millis()</code> function.
+ On Arduino, this returns the number of milliseconds since startup.
+ This is part of the Arduino bootstrapping code, which we do not have on PIC, so a small wrapper for this function had to be written.
+ The same functionality can be achieved with a timer and an interrupt service routine (which is, I assume, the way it works on Arduino as well).
+ p.
+ For the LCD I used a 4x40 display with green backlight.
+ It is #[a(href='http://www.ekenrooi.net/lcd/lcd.shtml') HD44780]-based but has two control chips, which can be turned on and off using two enable lines.
+ My #[a(href='https://github.com/camilstaps/HD44780_PIC') HD44780_PIC] C library can deal with this, as well as with 4- and 8-bit interface.
+ (This is all done through preprocessing <code>#define</code> statements so it does not slow down the code.)
+ p.
+ Other than these two points, porting the code was straightforward and no major changes have been made.
+
+ h4 Finishing
+ p.
+ There was not much space left next to the display.
+ I had just enough space for the LED, the reset button and the volume button.
+ The LED is absolutely necessary on the front for feedback.
+ p.
+ The 4x40 LCD performs very well.
+ A 4x20 or perhaps 2x40 would do the job as well, but I wouldn't go smaller than that.
+ Sometimes characters are missed or noise is interpreted as a character, so you should expect that perhaps 80% of the character space is used for the actual text.
+ p.
+ There is no need to place the frequency potentiometer on the front because it should be fixed to your side tone.
+ I found that a high-precision potentiometer is very useful to adjust the frequency.
+ The bandwidth of the audio mixer is relatively narrow.
+
+ h4 Future plans
+ p.
+ I intend to make the decoded text not only available on the LCD but also on the UART module.
+ The RX pin is used already, but one-way communication will be enough.
+ This way, another module could log QSOs to an SD card, another idea I have been playing with.
+ p.
+ Another addition I'd like to make is a fix-frequency button.
+ This would disable the automatic adaption to the current speed.
+ It could be pressed at the start of a QSO and released afterwards.
+ I hope that in this way the decoder can become less sensitive to background noise.
+ p.
+ Lastly, some status information would be nice on the LCD.
+ Concretely, I'm thinking about the estimated WPM.
+ This should be fairly simple to implement.
+ It could also be useful to have an accuracy estimation.
+ Figures that could be used for this are the standard deviation on the length of dits and dahs and the amount of jitter during a dit or dah.
diff --git a/resources/pug/finals/ham/index.pug b/resources/pug/finals/ham/index.pug
new file mode 100644
index 0000000..8cdae2f
--- /dev/null
+++ b/resources/pug/finals/ham/index.pug
@@ -0,0 +1,16 @@
+extends /layout-ham.pug
+
+block prepend menu
+ - var page = 'home'
+
+block subtitle
+ | Home
+
+block page
+ p.
+ This is a collection of some Ham radio related projects of mine.
+ Perhaps it will be larger than this one day.
+
+ p.
+ I'm regularly active on 20m with CW, as you can see #[a(href='https://foc.dj1yfk.de/activity/PD7LOL') here].
+ I look forward to meeting you on the band soon.
diff --git a/resources/pug/finals/index.pug b/resources/pug/finals/index.pug
new file mode 100644
index 0000000..454834f
--- /dev/null
+++ b/resources/pug/finals/index.pug
@@ -0,0 +1,132 @@
+extends /layout.pug
+
+block content
+ img#profile(alt="Camil Staps", style="float:left;", src="/assets/img/profile-300x300.png", width="170")
+ p #[a(href="mailto:info@vivisoft.nl") Freelance programmer]; Bachelor student #[a(href="http://www.ru.nl/opleidingen/bachelor/informatica/") Computing Science] and #[a(href="http://www.ru.nl/opleidingen/bachelor/theologie/") Theology]
+ p
+ span.tt info@camilstaps.nl
+ br
+ | GPG ID: #[a(href="http://pgp.mit.edu/pks/lookup?op=get&search=0x4A9BFD4F6A415F83") 6A315F83]
+ br
+ | Fingerprint: #[span.tt 7F41 677C FA51 D2AE 8A4A C47D 4A9B FD4F 6A41 5F83]
+ p
+ a(href="https://github.com/camilstaps") GitHub
+ br
+ a(href="https://nl.linkedin.com/in/camilstaps") LinkedIn
+ br
+ a(href="http://stackexchange.com/users/1679769/camil-staps") StackExchange
+ br
+ a(href="http://careers.stackoverflow.com/camilstaps") Stack Overflow Careers
+
+ hr
+
+ table.main_table
+ tr
+ td I like:
+ td Functional programming (#[a(href="http://clean.cs.ru.nl/Clean") Clean]), Linux (Debian), LaTeX (TikZ), PIC microcontrollers, regular expressions, Docker
+ tr
+ td I know:
+ td The above, Python, PHP (Laravel), SQL, HTML, CSS, JavaScript (jQuery), Bootstrap, WordPress, C(++), Java
+ tr
+ td My wishlist:
+ td R, LXC, functional programming on microcontrollers, data mining
+
+ h2 Work
+ table.main_table
+ tr
+ td 2013 - present
+ td Owner of ViviSoft. #[a(href="mailto:info@vivisoft.nl") Contact me] for any projects in software or hardware development.
+ tr
+ td 2015 - present
+ td
+ p Student assistant at the #[a(href="http://www.ru.nl/science") Faculty of Science] at the Radboud University Nijmegen.
+
+ mixin saItem(guide, name)
+ a(href=guide)= name
+ br
+
+ h6 2016-17
+ p
+ +saItem("https://studiegids.science.ru.nl/2016/science/prospectus/inf_ba/course/40559/", "Algorithms and Data Structures")
+ +saItem("https://studiegids.science.ru.nl/2016/science/course/40511/", "Combinatorics")
+ +saItem("http://studiegids.science.ru.nl/2016/en/socsci/course/41452/", "Functional Programming for AI")
+ +saItem("http://www.studiegids.science.ru.nl/2016/science/prospectus/inf_ba/course/40568/", "Functional Programming 1")
+ +saItem("http://studiegids.science.ru.nl/2016/en/science/course/40564/", "Introduction to Cryptography")
+ +saItem("https://studiegids.science.ru.nl/2016/science/prospectus/inf_ba/course/40560/", "Operating Systems")
+ h6 2015-16
+ p
+ +saItem("https://cs.ru.nl/~hubbers/courses/co_1516/", "Combinatorics")
+ +saItem("https://studiegids.science.ru.nl/2015/science/prospectus/inf_ba/course/37072/", "Functional Programming 1")
+ +saItem("https://studiegids.science.ru.nl/2015/course/37073/", "Functional Programming 2")
+ +saItem("https://studiegids.science.ru.nl/2015/science/prospectus/inf_ba/course/37067/", "Introduction to Cryptography")
+ +saItem("https://cs.ru.nl/~hubbers/courses/ms_1516/", "Mathematical Structures")
+
+ h2 Education
+ table.main_table
+ tr
+ td 2014-2017
+ td BSc. #[a(href="http://www.ru.nl/opleidingen/bachelor/informatica/") Computing Science &amp; Cyber Security], Radboud University Nijmegen. Some of my work related to this education may be found on #[a(href="https://git.camilstaps.nl") git.camilstaps.nl]; releases appear on #[a(href="https://files.camilstaps.nl") files.camilstaps.nl].
+ tr
+ td 2015-2017
+ td BA. #[a(href="http://www.ru.nl/opleidingen/bachelor/theologie/") Theology], Radboud University Nijmegen. Some of my work related to this education may be found on #[a(href="https://files.camilstaps.nl") files.camilstaps.nl].
+
+ h2 Software projects &amp; libraries
+ table.main_table
+ tr
+ td: a(href="http://cloogle.org/") Cloogle
+ td Hoogle clone for Clean (co-author &amp; co-maintainer)
+ tr
+ td: a(href="https://github.com/nichtich/tkz-orm") tkz-orm
+ td LaTeX package for drawing Object-Role Model (ORM) diagrams using PGF and TikZ (#[a(href="https://ctan.org/pkg/tkz-orm") CTAN]) (co-maintainer)
+ tr
+ td: a(href="https://github.com/camilstaps/ESP8266_PIC") ESP8266_PIC
+ td ESP8266 library for PIC microcontrollers
+ tr
+ td: a(href="https://parse.hebrewtools.org") ParseTrainer
+ td Web app to practice parsing Hebrew verbs (#[a(href="https://github.com/HebrewTools/ParseTrainer") GitHub])
+ tr
+ td: a(href="https://clauses.hebrewtools.org") ClausesFormatter
+ td Web app to format an Old Testament text in clauses, exports to TeX and PDF (#[a(href="https://github.com/HebrewTools/ClauseFormatter") GitHub])
+ tr
+ td: a(href="https://github.com/camilstaps/fuspel") fuspel
+ td A minimal, untyped, lazy functional programming language based on term rewriting
+ tr
+ td: a(href="https://github.com/camilstaps/latexgit") latexgit
+ td LaTeX package for fetching and typesetting git information (#[a(href="http://ctan.org/pkg/latexgit") CTAN])
+ tr
+ td: a(href="https://github.com/camilstaps/bibletext") bibletext
+ td LaTeX package for inserting Bible texts by specifying references (#[a(href="http://ctan.org/pkg/bibletext") CTAN])
+
+ p Find more on #[a(href="https://github.com/camilstaps") GitHub] and #[a(href="https://git.camilstaps.nl/") git.camilstaps.nl].
+
+ h2 Talks
+ table.main_table
+ tr
+ td #[a(href="https://linuxnijmegen.nl/bijeenkomsten/67-lugn50-dinsdag-11-oktober-2016") 11th October 2016]
+ td #[a(href="https://docker.io") Docker] introduction for the #[a(href="https://linuxnijmegen.nl/") Linux User Group Nijmegen] (#[a(href="https://files.camilstaps.nl/LUGN-Docker/docker.pdf") PDF])
+
+ h2 Other interests
+ ul
+ li I am a radio amateur (#[a(href="/ham") PD7LOL]). I am primarily active on 20m with CW.
+ li I am a community moderator at the #[a(href="https://philosophy.stackexchange.com") Philosophy Stack Exchange].
+ li Making paper cuts, such as #[a(href="/assets/img/papercut.png") this one] or #[a(href="/assets/img/papercut-whales.png") that one].
+ li I have been a volunteer in the #[a(href="http://www.taize.fr/") Taiz&eacute;] community in 2013-14.
+
+ h2 Contact details
+ p +31 6 4045 1121
+ p
+ span.tt info@camilstaps.nl
+ br
+ | GPG ID: #[a(href="http://pgp.mit.edu/pks/lookup?op=get&search=0x4A9BFD4F6A415F83") 6A315F83]
+ br
+ | Fingerprint: #[span.tt 7F41 677C FA51 D2AE 8A4A C47D 4A9B FD4F 6A41 5F83]
+ p
+ | #[a(href="https://github.com/camilstaps") GitHub], #[a(href="https://nl.linkedin.com/in/camilstaps") LinkedIn], #[a(href="http://stackexchange.com/users/1679769/camil-staps") StackExchange], #[a(href="http://careers.stackoverflow.com/camilstaps") Stack Overflow Careers]
+ p
+ | KvK: ViviSoft; 57363145
+ br
+ | BTW: NL223923096B01
+ p
+ | IBAN: NL68 ASNB 0707 8177 65
+ br
+ | BIC: ASNBNL21
diff --git a/resources/pug/include/foot.pug b/resources/pug/include/foot.pug
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/resources/pug/include/foot.pug
diff --git a/resources/pug/include/head.pug b/resources/pug/include/head.pug
new file mode 100644
index 0000000..7099c24
--- /dev/null
+++ b/resources/pug/include/head.pug
@@ -0,0 +1,10 @@
+title
+ block titleContainer
+ block title
+ | Camil Staps
+
+meta(charset='utf-8')
+meta(http-equiv='X-UA-Compatible', content='IE=edge')
+meta(name='viewport', content='width=device-width, initial-scale=1')
+
+link(rel='stylesheet', href='/assets/css/style.css', type='text/css')
diff --git a/resources/pug/include/layout-ham.pug b/resources/pug/include/layout-ham.pug
new file mode 100644
index 0000000..ab080cf
--- /dev/null
+++ b/resources/pug/include/layout-ham.pug
@@ -0,0 +1,9 @@
+extends layout-sidebar.pug
+
+block title
+ | PD7LOL
+
+block append menu
+ - var base_url = '/ham/'
+ +menuItem('home' == page, base_url, 'Home')
+ +menuItem('cw-decoder' == page, base_url + 'cw-decoder.html', 'CW Decoder')
diff --git a/resources/pug/include/layout-sidebar.pug b/resources/pug/include/layout-sidebar.pug
new file mode 100644
index 0000000..bdbec70
--- /dev/null
+++ b/resources/pug/include/layout-sidebar.pug
@@ -0,0 +1,27 @@
+extends layout.pug
+
+block append titleContainer
+ | &ndash;
+ block subtitle
+
+block content
+ div.row
+ div.col-lg-3.col-md-4
+ ul.nav.nav-pills.nav-stacked
+ block menu
+ mixin menuItem(active, link, text)
+ li(role='presentation', class=active ? 'active' : '')
+ a(href=link)= text
+
+
+ div.col-lg-7.col-md-6
+ h3(style={'margin-top': 0})
+ block subtitle
+ | &nbsp;
+ small
+ block subtitleDate
+ div.col-lg-2.col-md-2.text-right
+ block subtitle-right
+
+ div.col-lg-9.col-md-8.text-justify
+ block page
diff --git a/resources/pug/include/layout.pug b/resources/pug/include/layout.pug
new file mode 100644
index 0000000..6a89533
--- /dev/null
+++ b/resources/pug/include/layout.pug
@@ -0,0 +1,27 @@
+include /mixins.pug
+
+doctype html
+html(lang="en")
+ head
+ include head.pug
+
+ body
+ .container
+ h1
+ block titleContainer
+ block title
+ | Camil Staps
+ hr
+
+ block content
+
+ - var date = new Date()
+ footer.footer
+ hr
+ p.text-center
+ | Copyright &copy; Camil Staps #{date.getFullYear()} &nbsp;&bull;&nbsp;
+ = "Last updated " + date.toDateString()
+
+ include foot.pug
+
+ block js
diff --git a/resources/pug/include/mixins.pug b/resources/pug/include/mixins.pug
new file mode 100644
index 0000000..14c78f3
--- /dev/null
+++ b/resources/pug/include/mixins.pug
@@ -0,0 +1,3 @@
+mixin githubIconLink(repo)
+ a(href='https://github.com/' + repo, target='_blank', title='Source on GitHub')
+ img(src='/assets/img/github.png', alt='GitHub')