Monitor and log the fill level of city trash bins. Make more efficient use of sanitation department resources, and create rich datasets for city planners.
We'll show you how to build it.First, Sign up with or sign in to Google.
Create a new Calendar and name it bin status or anything you like. This will be used to log when a trash can has been emptied.
Create a new project from the Google developers console.
Enable Google's Calendar API for your application. This will allow your board to post to the calendar when the trash is emptied.
Add an OAuth 2.0 client ID credential. You may be prompted to configure a consent screen where you'll need to save a Product Name. Specify Web Application, then use the line below as the Redirect URI.
https://CMSVAR:ACCOUNT_NAME.temboolive.com/callback/google
Sign up for a Zendesk account. We'll use Zendesk to send alerts when the trash is half full, three-quarters full, and completely full.
Find your Calendar ID in Calendar Settings in the Calendar Address section.
This application uses your board's local time when calculating Google Calendar dates. To ensure accuracy, your board's timezone should be set to UTC.
Connect the power and ground of your board to your breadboard.
When trash level exceeds the specified 50%, 75%, and 100% thresholds, a Zendesk ticket will be created.
We'll smooth our data in the code by looking at the average of the last 100 readings.
Connect the second pin of the sensor to ground, and the third pin to power.
If this is the first time using Temboo, you'll need to set up your ARTIK board to find the Temboo libraries. To do so, you'll need to create the file temboo.conf in /etc/ld.so.conf.d. Inside of temboo.conf, you'll want to copy the line below and paste it into the file:
/opt/iothub/artik/temboo/temboo_artik_library/lib
After saving temboo.conf, run ldconfig from the command line to add the Temboo library directory to the system library search path.
You’ll also need to get the IP address of your ARTIK board using ifconfig. The example below shows the results when the ARTIK board is connected to the internet through an ethernet cable. The IP address you'll want to use is listed next to inet.
[root@localhost ~]$ ifconfig eth0: flags=4163 mtu 1500 inet 10.11.6.200 netmask 255.255.255.0 broadcast 10.11.6.255
Download and unzip the IoT Application file. In your IoT Application folder, you'll find a Samsung folder containing the SmartTrashCans folder with code for the Artik. Copy the Samsung folder to your ARTIK board using scp. From your computer, go to the directory where the Samsung folder is located and type the command below. Make sure you use the IP address for your board you found using ifconfig.
[root@localhost ~]$ scp -r SmartTrashCans root@xxx.xxx.xxx.xxx:/home
Now
make
We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.
Open the .ino file with Energia. While the sketch is running, open the Serial Monitor and you should see your app running.
Congratulations! Now that you know how to make your LaunchPad run any Choreo, you're just a few steps away from making something extraordinary.
You can find more examples of how to use Temboo with your LaunchPad here.
We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.
Save and upload your sketch to the Arduino Yún, and open the serial monitor.
Congratulations! You've just run an IoT Application. With Temboo handling all the small stuff, you're free to think big.
You can find lots of examples of how to use Temboo with your Yún here.
We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.
Make sure you have the latest Xcode, which can be downloaded here.
Download the code at the link above.
Unzip the files where you can find them. You should see one folder containing the iOS code, and another containing the hardware device code.
Locate the .xcodeproj file in the iOS code. Open the file with Xcode and you should see all of the accompanying files in the Project navigator.
If the file titles in your Project navigator are red, you'll need to relink them by clicking control and selecting "Add Files to
The latest Temboo iOS SDK can be downloaded here. Save and unzip it to a folder where you can find it.
Once again, you'll need to control-click on the top-level folder in your Xcode Project navigator. Select "Add Files to
Repeat the above steps to add the appropriate files located in the SDk's src/library folder.
Make sure you have a device selected in the simulator, and click the run button.
Congratulations! You should see the app displayed in the simulator window. Go ahead and try it out, and you should see the Choreo results printed to the console.
We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.