balena application to showcase an Artik-10 or 5 pushing Infrared Proximity Sensor (Sharp GP2Y0A21YK) to the ARTIK Cloud.
- Ensure you have git installed on your computer.
- Get your Artik set up with balena
Connect the sensor as shown below:
- You need a Samsung account and a device created in the ARTIK Cloud dashboard
- You need to create a new device type here
- Manifest - Upload device_manifest.json from this repository.
- Manifest - Upload device_manifest.json from this repository.
- You need to sign into the user portal and connect a device using the device type name you created earlier.
- Select the gear icon on your new device and then generate a token.
Set these environment variables in your balena applications dashboard.
ARTIKCLOUD_URL
=> string (optional) ( defaults tohttps://api.samsungsami.io/v1.1/messages
) the ARTIKCLOUD endpointARTIKCLOUD_DEVICE_TOKEN
=> string (required) The Device ID set in the ARTIKCLOUD dashboardARTIKCLOUD_DEVICE_ID
=> string (required) The Device token generated in the ARTIKCLOUD dashboardSENSOR_THRESHOLD
=> string (optional) The ADC threshold to activate the sensorPOLL_INTERVAL
=> number (optional) Time in milliseconds to poll the sharp sensorDEVICE_NAME
=> string (optional) The Device name to send to ARTIKCLOUD
git clone https://github.com/balena-projects/balena-artik-cloud-publisher && cd balena-artik-cloud-publisher
git remote add balena git@git.balena-cloud.com:myGithubName/balenaAppName.git
git push balena master
Check balena & Artik dashboard.