Wire the project together as shown in the diagram (and photograph) above.
The solenoid draws a lot of current, can't run off USB power or 9V battery so we use the external power supply. The Darlington transistor allows us to switch the 12V power to the lock using an Arduino pin.
The Adafruit Bluefruit LE hardware is Bluetooth Low Energy, but we're using it to do serial communication similar to Bluetooth Classic's Serial Port Profile (SPP). There is no SPP for BLE, that's not really how BLE works, so people create custom "serial like" services using the GATT. Adafruit is re-using the UUIDs from the Nordic Semiconductor's UART service.
Alasdair Allan is a scientist, author, hacker and tinkerer, who is spending a lot of his time thinking about the Internet of Things. In the past he has mesh networked the Moscone Center, caused a U.S. Senate hearing, and contributed to the detection of what was—at the time—the most distant object yet discovered.
When you buy through links on our site, we may earn an affiliate commission.
We'll assume you're ok with this, but you can opt-out if you wish.