Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the updraftplus domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home1/wyolum/public_html/wp-includes/functions.php on line 6114

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893

Warning: Cannot modify header information - headers already sent by (output started at /home1/wyolum/public_html/wp-includes/functions.php:6114) in /home1/wyolum/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1893
{"id":1059,"date":"2012-10-24T00:42:12","date_gmt":"2012-10-24T04:42:12","guid":{"rendered":"https:\/\/wyolum.com\/?p=1059"},"modified":"2012-10-27T12:14:53","modified_gmt":"2012-10-27T16:14:53","slug":"alamode-web-controlled-train-example","status":"publish","type":"post","link":"https:\/\/wyolum.com\/alamode-web-controlled-train-example\/","title":{"rendered":"AlaMode: Web Controlled Train Example"},"content":{"rendered":"

Update!: You can now\u00a0buy AlaMode at Seeedstudios<\/a><\/em><\/p>\n

<\/em>Here’s an example of using the AlaMode with the Raspberry Pi.<\/p>\n

We had a great time demoing the AlaMode at MakerFaire. We got invited to demo in the MakerShed, because …. Surprise! MakerShed is going to carry AlaMode!<\/p>\n

For this demo, \u00a0I took an\u00a0adafruit motorshield<\/a>\u00a0and used it to modulate the power to a 9V Lego train track.<\/p>\n

\n
\n
\"\"<\/a><\/dt>\n
Photo by Brian Kronz<\/dd>\n<\/dl>\n<\/div>\n

The Arduino code is pretty simple, using Serial.read to interpret single characters as commands for controlling the motor shield. “f” means forward, “b” means back, “s” means stop. 1-9 sets the speed. \u00a0You’ll also need to install the\u00a0AFMotor \u00a0library<\/a>.<\/p>\n

Program the aalegotrain.ino sketch from here:\u00a0https:\/\/github.com\/wyolum\/alamode\/tree\/master\/examples\/train_demo<\/a><\/p>\n

You can either do this with an FTDI cable on another computer, or directly with the\u00a0Arduino IDE on the Raspberry Pi<\/a>.<\/p>\n

The ala-modey part of this is to use the AlaMode to do the controlling motor bit. The Raspberry Pi will control the train through a web interface.<\/p>\n

Install \u00a0lighttpd on the Pi (sudo apt-get install lighttpd) and put the web files from the example into \/var\/www.<\/p>\n

\n
\n
\"\"<\/dt>\n
photo by Drew Fustini<\/dd>\n<\/dl>\n<\/div>\n

It’s a little slow because it’s a simple CGI script (spins up a whole process with each request.) A python script interprets button presses on the web page, and uses pyserial to send the characters to AlaMode.<\/p>\n

Drew Fustini of Element 14 did a\u00a0great blog post<\/a>\u00a0on our demo.<\/p>\n

Here’s a video he posted:<\/p>\n

[youtube]http:\/\/www.youtube.com\/watch?fv=y-9g_mfdFhc<\/a>[\/youtube]<\/p>\n

If you have any questions, join the conversation at the\u00a0Wyolum forums.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

Update!: You can now\u00a0buy AlaMode at Seeedstudios Here’s an example of using the AlaMode with the Raspberry Pi. We had a great time demoing the AlaMode at MakerFaire. We got invited to demo in the MakerShed, because …. Surprise! MakerShed … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,29],"tags":[],"class_list":["post-1059","post","type-post","status-publish","format-standard","hentry","category-alamode","category-a-la-mode-examples"],"_links":{"self":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts\/1059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/comments?post=1059"}],"version-history":[{"count":5,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts\/1059\/revisions"}],"predecessor-version":[{"id":1077,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/posts\/1059\/revisions\/1077"}],"wp:attachment":[{"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/media?parent=1059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/categories?post=1059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wyolum.com\/wp-json\/wp\/v2\/tags?post=1059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}