Skip to content

Latest commit

 

History

History
 
 

HeartQuotes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

#005 Heart Quotes

Press a button to snaffle a random quote from Heart Quotes and print it to a 16x2 LCD.

The Build

▶️ return to the LEAP Catalog

Notes

This currently just dumps the web response from the HeartQuotes API to the console and LCD panel.

The 220R resistor connecting +5V to the switch is not really required, and is included more as a link on the breadboard. From Digital Pins: "Pins configured [as INPUT] are said to be in a high-impedance state. Input pins make extremely small demands on the circuit that they are sampling, equivalent to a series resistor of 100 megohm in front of the pin."

Sample console output

firing up the Ethernet...
Press the button to get a quote!
connected
quote: The days of good English has went.
disconnecting.

Sample raw response from iheartquotes.com

This gets parsed down into just the actual "quote" part:

$ curl -0 -i --raw "http://iheartquotes.com/api/v1/random?max_lines=1&show_permalink=0&show_source=0&format=text"
HTTP/1.1 200 OK
Connection: close
Etag: "b4279ec5fc6f80b38c73f8e305a894b0"
X-Ua-Compatible: IE=Edge,chrome=1
Date: Sun, 28 Dec 2014 04:51:22 GMT
X-Runtime: 0.030803
Content-Type: text/plain
Cache-Control: max-age=0, private, must-revalidate
Server: thin 1.2.6 codename Crazy Delicious
Via: 1.1 vegur

Oxymoron 27. Butt head

http://iheartquotes.com/fortune/show/37996

Console Output

Construction

The Breadboard

The Schematic

The Build

Parts for a breadboard build

Credits and references