![](/media/cache/group/arm_mbed.PNG.50x50_q85.png)
Dreamforce 2014 Workshop Exercise - RFID Case Generator
Dependencies: BufferedSerial C12832 EndpointMain-rfid EthernetInterface Logger StatusReporter-df2014 mbed-rtos mbed
Fork of df-2014-workshop-rfid-case-generator-k64f by
Overview
This code demonstrates how to use the mbed platform with a ID-12LA RFID reader and a Freescale K64F to get data into the SalesForce cloud.
This project was generated as a workshop for DreamForce 2014..
Details
The 2014 DreamForce workshop centers around an example scenario where you, as a street light technician, will "check in" to a given street light to service it. The street lights in this example are intelligent - they are connected, have knowledge about who/what they are, and in this example, contain an RFID sensor to allow technicians to "check in" during a service event.
The purpose of the workshop exercise is to provide exposure to new developers that the mbed IDE and development environment/ecosystem is very simple and easy to setup and use. Additionally, the workshop highlights that mbed devices can directly interact with SalesForce. The slides for the workshop can be found here.
For more information about the mbed SalesForce Interface API and its use, please see: http://developer.mbed.org/teams/MBED_DEMOS/code/SalesforceInterface/
Pretty Pictures
For the workshop the mbed team designed breakout boards to connect the ID12LA to the Freescale K64F for ease of use. Pictures of the boards can be found below. If you are interested in the breakout board you can order one from the OSHPark project page or use the eagle or gerber files as you see fit.
The ID-12LA sockets onto the RFID Brekout Board which then is put onto the Freescale K64F.
Definitions.h@1:5c7d6b24a773, 2014-08-23 (annotated)
- Committer:
- ansond
- Date:
- Sat Aug 23 20:31:25 2014 +0000
- Revision:
- 1:5c7d6b24a773
- Parent:
- 0:df2aa79c64f2
- Child:
- 2:96346cab3dca
clean ups
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 0:df2aa79c64f2 | 1 | /* Copyright C2014 ARM, MIT License |
ansond | 0:df2aa79c64f2 | 2 | * |
ansond | 0:df2aa79c64f2 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
ansond | 0:df2aa79c64f2 | 4 | * and associated documentation files the "Software", to deal in the Software without restriction, |
ansond | 0:df2aa79c64f2 | 5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
ansond | 0:df2aa79c64f2 | 6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
ansond | 0:df2aa79c64f2 | 7 | * furnished to do so, subject to the following conditions: |
ansond | 0:df2aa79c64f2 | 8 | * |
ansond | 0:df2aa79c64f2 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
ansond | 0:df2aa79c64f2 | 10 | * substantial portions of the Software. |
ansond | 0:df2aa79c64f2 | 11 | * |
ansond | 0:df2aa79c64f2 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
ansond | 0:df2aa79c64f2 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
ansond | 0:df2aa79c64f2 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
ansond | 0:df2aa79c64f2 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
ansond | 0:df2aa79c64f2 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
ansond | 0:df2aa79c64f2 | 17 | */ |
ansond | 0:df2aa79c64f2 | 18 | |
ansond | 0:df2aa79c64f2 | 19 | #ifndef _DEFINITIONS_H_ |
ansond | 0:df2aa79c64f2 | 20 | #define _DEFINITIONS_H_ |
ansond | 0:df2aa79c64f2 | 21 | |
ansond | 1:5c7d6b24a773 | 22 | // ----------------- WORKSHOP TUNABLES ----------------- |
ansond | 1:5c7d6b24a773 | 23 | |
ansond | 1:5c7d6b24a773 | 24 | // Tunables for RFID tags |
ansond | 1:5c7d6b24a773 | 25 | #define FIRST_WIDGET_RFID 0123345 |
ansond | 1:5c7d6b24a773 | 26 | #define FIRST_WIDGET_NAME "WizBang Thingy" |
ansond | 1:5c7d6b24a773 | 27 | #define FIRST_WIDGET_DESCRIPTION "Neutron De-nebulizer" |
ansond | 1:5c7d6b24a773 | 28 | #define SECOND_WIDGET_RFID 6789012 |
ansond | 1:5c7d6b24a773 | 29 | #define SECOND_WIDGET_NAME "OddStrange Thingy" |
ansond | 1:5c7d6b24a773 | 30 | #define SECOND_WIDGET_DESCRIPTION "Colorizing Tenderizer" |
ansond | 1:5c7d6b24a773 | 31 | |
ansond | 1:5c7d6b24a773 | 32 | // My Salesforce APEX host for case generation |
ansond | 1:5c7d6b24a773 | 33 | #define MY_SF_HOST "danson.na17.force.com" |
ansond | 1:5c7d6b24a773 | 34 | |
ansond | 1:5c7d6b24a773 | 35 | // ----------------- WORKSHOP TUNABLES ----------------- |
ansond | 1:5c7d6b24a773 | 36 | |
ansond | 1:5c7d6b24a773 | 37 | // mbed |
ansond | 0:df2aa79c64f2 | 38 | #include "mbed.h" |
ansond | 0:df2aa79c64f2 | 39 | |
ansond | 0:df2aa79c64f2 | 40 | // Our App version |
ansond | 0:df2aa79c64f2 | 41 | #define APP_VERSION "1.0.0" |
ansond | 0:df2aa79c64f2 | 42 | |
ansond | 0:df2aa79c64f2 | 43 | // My Salesforce APEX case resource path |
ansond | 0:df2aa79c64f2 | 44 | #define MY_APEX_CASE_RESOURCE "/services/apexrest/CaseService" |
ansond | 0:df2aa79c64f2 | 45 | |
ansond | 0:df2aa79c64f2 | 46 | // Buffer length for HTTPS requests |
ansond | 0:df2aa79c64f2 | 47 | #define BUFFER_LENGTH 256 |
ansond | 0:df2aa79c64f2 | 48 | |
ansond | 0:df2aa79c64f2 | 49 | // maximum log message length |
ansond | 0:df2aa79c64f2 | 50 | #define MAX_LOG_MESSAGE 128 |
ansond | 0:df2aa79c64f2 | 51 | |
ansond | 0:df2aa79c64f2 | 52 | // What platform we are compiling on |
ansond | 0:df2aa79c64f2 | 53 | #define _NXP_PLATFORM true |
ansond | 0:df2aa79c64f2 | 54 | |
ansond | 0:df2aa79c64f2 | 55 | // Wait Time for iterations (ms) |
ansond | 0:df2aa79c64f2 | 56 | #define WAIT_TIME_MS 500 |
ansond | 0:df2aa79c64f2 | 57 | |
ansond | 0:df2aa79c64f2 | 58 | // Tunables for WidgetDB |
ansond | 0:df2aa79c64f2 | 59 | #define MAX_NAME_LENGTH 64 |
ansond | 0:df2aa79c64f2 | 60 | #define MAX_DESCRIPTION_LENGTH 128 |
ansond | 0:df2aa79c64f2 | 61 | #define MAX_NUM_WIDGETS 2 |
ansond | 0:df2aa79c64f2 | 62 | |
ansond | 0:df2aa79c64f2 | 63 | // convenience definitions for WidgetDB... 2 RFIDs/station |
ansond | 0:df2aa79c64f2 | 64 | #define FIRST_WIDGET 0 |
ansond | 0:df2aa79c64f2 | 65 | #define SECOND_WIDGET 1 |
ansond | 0:df2aa79c64f2 | 66 | |
ansond | 0:df2aa79c64f2 | 67 | #endif // _DEFINITIONS_H_ |