Skip to content

Instantly share code, notes, and snippets.

@AndresMWeber
Created February 16, 2020 00:07
Show Gist options
  • Save AndresMWeber/276d38d7de5b59f7dbceaa1c88a2d4ec to your computer and use it in GitHub Desktop.
Save AndresMWeber/276d38d7de5b59f7dbceaa1c88a2d4ec to your computer and use it in GitHub Desktop.
Explanation for For the Love of IoT

Yeah I don't have a specific tutorial but here's what worked for me:

I did Tools-->Port-->(change this one by one and hit upload). That should help you find the successful proper serial port you connected your arduino to on your computer.

After that this is what the example cURL command was that I sent to the Heroku REST API that successfully POSTs and shows up on my device screen (I just tested it now too):

curl --location --request POST 'messaging-thing-api.herokuapp.com/api/messaging' \
--header 'Content-Type: application/json' \
--data-raw '{
	"toDevice": "AndresDevice",
	"fromDevice": "AndresDevice",
	"text": "this is cool"
}'

Just change your device to/from to yours and you can message yourself.

I would also suggest lowering the delay set on all the different functions to something like 500ms instead for easier testing. You can keep the GET request function at a slower delay but the button checkers are much easier when they have lower delays so you don't have to hold the buttons down so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment