- Activate Hologram SIM
- Generate CSRPSK Device Key and save it temporarily, we'll use it soon.
- Wire components
- Remove power from Trinket
- Wire from left to right on the modem
- RST - 2
- GND - GND
- RXD - 4
- TXD - 3
- VDD - USB
- GND - GND
- 5VIN - USB
- Run
verify/main.py
to check if modem is wired correctly- Connect Trinket to computer
- Replace
lib
folder with the one in this repo - Upload the
main.py
from this repo underverify/main.py
to the boards root - Apply power.
- You're all set if the board blinks BLUE then GREEN.
- If the trinket blinks BLUE the RED you need to double check your wiring
- Hint: You can open a serial monitor @ baud 115200 to see debug messages
I've included a resource/
folder in this repo containing SIMCOM AT command manuals.
- Open the TCP manual as a reference.
- Open
workshop/main-starter.py
in an IDE. - I've commented where each modem command should go, the challenge is to try and fill it in :).
- Rename file to
main.py
- Paste in your Device Key in the key variable near the top of the file
- Go to each comment and try to discover what command needs to go there
- Hint 1: Refer to the simCOM manuals
- Hint 2: I've done the first one for you in the
disconnect()
function, around line 60.
- Rename file to
- Check your work against my code in
workshop/main-final.py
- Plug the trinket in and upload
main.py
as often as you like to check your progress- Make sure to open a serial monitor to watch debug messages
- Send a string message to the cloud
By the end you should have completed the following
- Configure the modem
- Connect to the cellular network
- Sent a message to the cloud
- Disconnected from the cloud
- Coming soon.... aka if I have time :)
As mentioned, the resource/
folder contains SIMCOM AT command manuals. I would encourage you to skim the table of contents and try anything interesting.
Some suggestions:
- Cell locate: Use cell tower triangulation to determine you approximate coordinates
- Send and receive SMS messages
- Use UDP instead of TCP