HackerBox 0063: Samadhi
by HackerBoxes in Circuits > Microcontrollers
6296 Views, 17 Favorites, 0 Comments
HackerBox 0063: Samadhi
Greetings to HackerBox Hackers around the world!
HackerBox 0063 features two different SAMD ARM Core Development Boards. The SAMD21-powered Adafruit QT Py and the SAMD51-powered Mini SAM M4 can both be programmed with either CircuitPython or using the Arduino IDE. Explore the ESP8266 Wemos D1 Mini to run code directly on its Tensilica RISC core or configure the ESP8266 as a communication peripheral to provide WiFi connectivity for another microcontroller. Also, study remote wireless keystroke injection attacks and experiment with virtual machine technology.
HackerBoxes is the monthly subscription box service for enthusiasts of electronics and computer technology - Hardware Hackers - The Dreamers of Dreams.
There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we really appreciate your taking a few minutes to read the FAQ.
Supplies
This Instructable contains information for getting started with HackerBox 0063. The full box contents are listed on the product page for HackerBox 0063 where the box is also available for purchase while supplies last. If you would like to automatically receive a HackerBox like this right in your mailbox each month with a $15 discount, you can subscribe at HackerBoxes.com and join the revolution!
A soldering iron, solder, and basic soldering tools are generally needed to work on the monthly HackerBox. A computer for running software tools is also required. Have a look at the HackerBox Deluxe Starter Workshop for a set of basic tools and a wide array of introductory activities and experiments.
Most importantly, you will need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.
Samadhi
Pondering a theme related to our two SAMD microcontrollers for this box...
The Mini SAM M4 Dev Board features the ATSAMD51G19
The Adafruit QT Py features the ATSAMD21E18
We can consider what SAM stands for:
- SAM
- Smart ARM MCU
- Smart Advanced RISC Machine MCU
- Smart Advanced RISC Machine Microcontroller Unit
- Smart Advanced Reduced Instruction Set Computing Machine Microcontroller Unit
OK, well that's a mouthful - probably best to just leave it at SAM, or for a bit of thematic poetry, we could imagine that SAM is short for SAMADHI.
Derived from the root sam-a-dha, meaning "to collect" or "bring together", samadhi is often translated as "concentration" or "unification of mind". Samadhi is a state of profound and utterly absorptive contemplation of the Absolute that is undisturbed by desire, anger, or any other ego-generated thought or emotion. It is a state of joyful calm, or even of rapture and beatitude, in which one maintains full mental alertness and acuity.
Nice.
Mini SAM M4 Development Board
The Mini SAM M4 Development Board is based on the Microchip SAMD51G 32-Bit ARM Cortex-M4F MCU running at 48Mhz. It was designed by Ben Shockley who was inspired by the classic 1980s "spaceman" LEGO minifigure.
The board features a microUSB port interface for programming and power. Its header pins are smaller than usual (0.050 inch instead of the usual 0.1 inch) and breakout six analog pins (including a true analog output) and several digital pins including some dedicated I2C, SPI, and UART connections.
There are two LED indicators. The “Built-In” LED is located on the reverse side of the board and shines through the spaceship on the front of the board when illuminated. The second is an APA102 RGB LED.
There are two buttons. One is tied to RESET and the other is user programmable.
A 2MB Quad-SPI flash memory chip provides plenty of space for CircuitPython as well as user code. Mini SAM comes pre-loaded with CircuitPython
Ben Shockley's Mini-SAM Repository
Mini SAM Breadboard Backpack
The Mini SAM M4 Development Board features header pins that are smaller than usual. The headers are 0.050 inch pin pitch, which is half of the usual 0.1 inch pitch that we're all used to. In other words, they are twice as dense. While these smaller headers help make the Mini SAM super tiny and cute, the denser pitch is not compatible with solderless breadboards or jumper wires. Until, that is, we slap a Breadboard Backpack onto Mini SAM's space suit!
This cool PCB was also originally designed by Ben Shockley who was kind enough to help us run a batch for this HackerBox. Thank you Ben!
Adding the included headers to the Backpack PCB is fairly self-explanatory, just make sure the board is not upside down. The 0.1 inch headers (the bigger ones) go on the side of the board where the silkscreen word "MINI" is on SAM's lower abdomen. We can call this the bottom of the Backpack PCB since the 0.1 inch headers will face down while using a solderless breadboard.
The smaller headers go on the side of the board where the silkscreen word "MINI" is closer to SAM's neck. We can call this the top of the Backpack PCB. The smaller headers can be soldered with the female headers on SAM's back and the male headers on the top of the Backpack PCB (as shown in the photo). Or they can go the other way around, whichever you prefer. SAM doesn't mind at all. You can even do some one way and some the other way as long as the connecting pairs are opposite. Go nuts!
Adafruit QT Py
The Adafruit QT Py is a tiny development board based on the powerful ATSAMD21E18 chip. That SAMD features a 32-bit Cortex M0+ 32 bit processor core running at 48MHz. While using very little power, the QT Py offers amazing processing performance and ease of use. The QT Py features the same size, form-factor, and pin-out as Seeed Xiao module. Given its tiny size, we can easily pop one into any small project.
QT Py features:
- ATSAMD21E18 32-bit Cortex M0+
- 48 MHz 32 bit processor
- 256KB Flash
- 32 KB RAM
- USB Type C connector
- STEMMA QT plug-n-play connector
- Native USB supported by every OS
- RGB NeoPixel LED
- 11 GPIO Pins
- Works with Arduino IDE or CircuitPython
GO HERE for the usual amazing array of online documentation from Adafruit.
Wemos D1 Mini ESP8266
The Wemos D1 Mini Module features the ESP8266 SOC. The ESP8266 SOC includes a microcontroller core, WiFi circuitry, and an integrated TCP/IP protocol stack. The ESP8266 is capable of running code directly on its MCU core. Or, the ESP8266 can act as a communication peripheral to provide WiFi functionality to another microcontroller. For example, we can connect a SAMD board and an ESP8266 module to add WiFi connectivity to the SAMD.
ESP8266 and Arduino IDE
The Wemos D1 Mini Module can be programmed using Arduino tools that you probably already have.
To add ESP8266 support within the Arduino IDE, follow Steps 1-5 of this tutorial.
Then, under Tools>Board, select "WEMOS D1 R2 & mini"
And open an example sketch:
File > Example > ESP8266 > Blink
Once uploaded, the Blink sketch will flash the blue LED on the Wemos D1 Mini.
As usual, experiment with changing both delay calls in the blink sketch to 2000, run the code, and then change them both to 200 and run the code again. Verify that the LED flashes ten times faster with the 200ms delays compared to the 2000ms delays. Cool beans!
BadUSB MalDuino W - Remote WiFi Keyboard
WifiDuck and its evolution into MalDuino W are examples of BadUSB devices. They can emulate a USB keyboard just like the original USB Rubber Ducky with the added feature of being controlled remotely over WiFi. Once assembled, you can simply plug one into a system, connect to its Wi-Fi network, and manage all scripts from within the web interface. Such devices use the Ducky Script language that Hak5 introduced for use with the USB Rubber Ducky.
WiFiDuck uses an ATmega32U4 connected to an ESP8266
MalDuino W uses an ARM Cortex-M0 connected to an ESP8266
Use this knowledge for good and not evil: BadUSB devices work because the keyboard on a computer is generally a trusted device. You plug it in and it can start typing right away. While a human might not type as fast, an automated BadUSB device can press hundreds of keys per second. Experimenting with BadUSB devices helps us understand the threats of keystroke injection attacks. Such devices can also be used to automate administrative tasks.
Learn to defend against BadUSB attacks.
Virtual Machines
What is a virtual machine?
Why do I need one?
How can I set one up for free right now?
VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).
Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of guest operating systems. VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Oracle ensures the product always meets professional quality criteria.
Trust Your Technolust
We hope you are enjoying this month's HackerBox adventure into electronics and computer technology. Reach out and share your success in the comments below or other social media. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.
What's Next? Join the revolution. Live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month. Surf over to HackerBoxes.com and sign up for your monthly HackerBox subscription.