If you can't read please download the document
Upload
frank-hunleth
View
3.220
Download
4
Embed Size (px)
Citation preview
Connecting Hardware to the Web with the BeagleBone
Frank HunlethTwitter: @fhunlethPi Masters Meetup 11/21/13
What!?!?! This isn't a Raspberry Pi?
But, they're both low cost Linux-based ARM platforms used and supported by many people just like us
Nuts & Bolts
Fast1 GHz ARM Cortex A8
Two 200 MHz microcontrollers (super cool!)
Lots of memory512 MB DRAM
2 GB Flash and MicroSD card slot
Connects to everythingEthernet, USB, HDMI
Tons of I/Os via the 2 46 pin headers
What You Need
Black vs. white Get the BeagleBone Black (BBB)
FTDI cable
Wired Ethernet*
4 GB+ MicroSD card
Memory card reader
5V power brick
Options!
Which OS?Angstrom Linux - default
Ubuntu Linux - lots of users
Buildroot - my favorite
Bare metal - OSs are for wimps
Which language?Javascript (node.js) - most support especially for new users
Python - lots of users, but not as popular as on the RPi
C/C++ - only option for some features
Assembly language - embedded microcontroller programming
Erlang - :-)
Connecting to the BeagleBone
Ethernetssh (user: root, password: root)
Webserver with docs and helpful links
Cloud9 editor at http://beaglebone:3000/
USB cableJust plug the USB cable into your PC for power
BeagleBone shows up as a network adapter
FTDI cableLooks like a serial port on your PC (115200 8N1)
Super helpful for debugging networking or boot issues
Cloud9
Use Firefox - not Chrome
BoneScript
Arduino-like library, but Javascript for Node.js
http://beagleboard.org/Support/BoneScript/
pinMode()digitalWrite()digitalRead()analogWrite()analogRead()readTextFile()writeTextFile()
pinMode() - set whether a pin is an input or outputdigitalWrite() - set a pin to high or lowdigitalRead() - read whether a pin is high or lowanalogWrite() - set the PWM period and durationanalogRead() - sample an ADCreadTextFile() - read a Linux kernel driver's sysfs file (or any other file)writeTextFile() - write to a sysfs file to interact with a Linux kernel driver
Demo Demo Demo
Demo Schematic
Code Walk-through
https://github.com/fhunleth/pimasters-bbb-demo
Going Further
BeagleBone capesTons of pre-made daughterboards available
Custom ones are not that hard to make!
BeagleBone microcontroller programmingReal-time logic
Assembly language (but not too hard)
NervesMy project for using the Erlang programming language to build embedded systems
http://nerves-project.org/
Connecting Hardware to the Web with the BeagleBone
Frank HunlethTwitter: @fhunlethPi Masters Meetup 11/21/13