This document describes connecting various sensors and devices to an OpenPicus Flyport, including a BMP085 temperature and pressure sensor over I2C, an HD44780 LCD display over I2C, and sending sensor data to cloud services. Specifically, it connects a BMP085 sensor to measure temperature and pressure, sends the measurements to Pachube for storage and graphing, and displays some values locally on an I2C LCD. It also describes setting the Flyport's real-time clock from a web time source and using alarms to trigger regular sensor readings. Paraimpu is used to generate tweets when sensor readings meet certain thresholds.
Explore your prometheus data in grafana - Promcon 2018Grafana Labs
- new Prometheus features in Grafana that were added over the last year
- instant query
- heatmap
- template variable expansion
- new Explore UI with split views and better tab completion for promQL queries
Netronome's half-day tutorial on host data plane acceleration at ACM SIGCOMM 2018 introduced attendees to models for host data plane acceleration and provided an in-depth understanding of SmartNIC deployment models at hyperscale cloud vendors and telecom service providers.
Presenter Bio
Jaco Joubert is a Software Engineer at Netronome focusing on P4 and its applications on the Netronome SmartNIC. He recently started investigating network acceleration for Deep Learning on distributed systems. Prior to Netronome he worked on mobile application development and was a researcher at Telkom SA focusing on the mobile core after completing his Masters Degree in Computer, Electronic Engineering in 2014.
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Databricks
“In Spark 2.0, we have extended DataFrames and Datasets to handle real time streaming data. This not only provides a single programming abstraction for batch and streaming data, it also brings support for event-time based processing, out-or-order/delayed data, sessionization and tight integration with non-streaming data sources and sinks. In this talk, I will take a deep dive into the concepts and the API and show how this simplifies building complex “Continuous Applications”.” - T.D.
Databricks Blog: "Structured Streaming In Apache Spark 2.0: A new high-level API for streaming"
https://databricks.com/blog/2016/07/28/structured-streaming-in-apache-spark.html
// About the Presenter //
Tathagata Das is an Apache Spark Committer and a member of the PMC. He’s the lead developer behind Spark Streaming, and is currently employed at Databricks. Before Databricks, you could find him at the AMPLab of UC Berkeley, researching datacenter frameworks and networks with professors Scott Shenker and Ion Stoica.
Follow T.D. on -
Twitter: https://twitter.com/tathadas
LinkedIn: https://www.linkedin.com/in/tathadas
Presented at PyCon UK 2018 (18 September 2018, Cardiff).
The slides are incomplete.
Recording available at:
https://www.youtube.com/watch?v=-weU0Zy4Yd8
This is a talk on how you can monitor your microservices architecture using Prometheus and Grafana. This has easy to execute steps to get a local monitoring stack running on your local machine using docker.
Explore your prometheus data in grafana - Promcon 2018Grafana Labs
- new Prometheus features in Grafana that were added over the last year
- instant query
- heatmap
- template variable expansion
- new Explore UI with split views and better tab completion for promQL queries
Netronome's half-day tutorial on host data plane acceleration at ACM SIGCOMM 2018 introduced attendees to models for host data plane acceleration and provided an in-depth understanding of SmartNIC deployment models at hyperscale cloud vendors and telecom service providers.
Presenter Bio
Jaco Joubert is a Software Engineer at Netronome focusing on P4 and its applications on the Netronome SmartNIC. He recently started investigating network acceleration for Deep Learning on distributed systems. Prior to Netronome he worked on mobile application development and was a researcher at Telkom SA focusing on the mobile core after completing his Masters Degree in Computer, Electronic Engineering in 2014.
Apache Spark 2.0: A Deep Dive Into Structured Streaming - by Tathagata Das Databricks
“In Spark 2.0, we have extended DataFrames and Datasets to handle real time streaming data. This not only provides a single programming abstraction for batch and streaming data, it also brings support for event-time based processing, out-or-order/delayed data, sessionization and tight integration with non-streaming data sources and sinks. In this talk, I will take a deep dive into the concepts and the API and show how this simplifies building complex “Continuous Applications”.” - T.D.
Databricks Blog: "Structured Streaming In Apache Spark 2.0: A new high-level API for streaming"
https://databricks.com/blog/2016/07/28/structured-streaming-in-apache-spark.html
// About the Presenter //
Tathagata Das is an Apache Spark Committer and a member of the PMC. He’s the lead developer behind Spark Streaming, and is currently employed at Databricks. Before Databricks, you could find him at the AMPLab of UC Berkeley, researching datacenter frameworks and networks with professors Scott Shenker and Ion Stoica.
Follow T.D. on -
Twitter: https://twitter.com/tathadas
LinkedIn: https://www.linkedin.com/in/tathadas
Presented at PyCon UK 2018 (18 September 2018, Cardiff).
The slides are incomplete.
Recording available at:
https://www.youtube.com/watch?v=-weU0Zy4Yd8
This is a talk on how you can monitor your microservices architecture using Prometheus and Grafana. This has easy to execute steps to get a local monitoring stack running on your local machine using docker.
This webinar explains why PISA chips are inevitable, provides overview of machine architecture of such switches, presents a brief primer on the P4 language with sample programs for a variety of networks and demonstrates a powerful network diagnostics application implemented in P4.
Programmability in SDNs is confined to the network control plane. The forwarding plane is still largely dictated by fixed-function switching chips. Our goal is to change that, and to allow programmers to define how packets are to be processed all the way down to the wire.
This is made possible by a new generation of high-performance forwarding chips. At the high-end, PISA (Protocol-Independent Switch Architecture) chips promise multi-Tb/s of packet processing. At the mid- and low-end of the performance spectrum, CPUs, GPUs, FPGAs, and NPUs already offer great flexibility with performance of a few tens to hundreds of Gb/s.
In addition to programmable forwarding chips, we also need a high-level language to dictate the forwarding behavior in a target independent fashion. "P4" (www.p4.org) is such a language. In P4, the programer declares how packets are to be processed, and a compiler generates a configuration for a PISA chip, or a programmable target in general. For example, the programmer might program the switch to be a top-of-rack switch, a firewall, or a load-balancer; and might add features to run automatic diagnostics and novel congestion control algorithms.
How to Integrate Internet of Things with Webserver with Ionela
The project is integrating several technologies, found during the investigation of Flyport :
- Web server
- Wifi connection
- Dynamic variables substitutions (in xml files)
- Ajax callbacks
- jQuery use case
- Dynamic Memory allocation (malloc/free) (see heap.s)
- Web service calls : for tweeter, thingspeak and nimbits
http://openpicus.blogspot.com/2012/01/flyport-web-controlled-simulator-tweet.html
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...InfluxData
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Telegraf
Network to Code, LLC is a network automation solution provider that helps companies transform the way their networks are deployed, managed, and consumed on a day-to-day basis by leveraging network automation, software development, and DevOps technologies and principles. They provide highly sought-after training and consulting services that integrate and deploy network automation technology solutions to improve reliability, security, efficiency, time to market, and customer satisfaction while reducing operational costs.
In this session Josh VanDeraa and David Flores from Network to Code will present how to monitor your network devices with Telegraf using both the SNMP and the gNMI input plugins. They will also present what the challenges are with ingesting the same type of data from different sources and how to remediate that by normalizing the data in Telegraf using processors.
PHYSICAL COMPUTING WITH RGB LED OR MATRIX
Today we enter a topic in programming called
embedded computing with the internet; we code a
RGB LED light on a Arduino board with a breadboard
on which we switch off or on the light by a browser
on an android device with our own web server and
their COM or socket protocols too.
Node-RED and Minecraft - CamJam September 2015Boris Adryan
This workshop uses the Node-RED framework as development tool for JavaScript. Building on functionality available for generic programming challenges, we’re going to use the communication standard TCP (Transmission Control Protocol) to interact with the Minecraft API (Application Programming Interface). The material is aimed at people who have had first experience with the Minecraft API on a Raspberry Pi (say, using Python), who now want to understand what's going on behind the scenes and what TCP, API and all those other acronyms mean. It also introduces flow-based programming concepts.
Weather data meets ibm cloud. part 3 transformation and aggregation of weat...Einar Karlsen
This IBM Developer article shows how to extract, transform and load weather data stored by IBM Cloud Object Storage using IBM SQL Query, pandas, Apache Spark, IBM Watson Studio and Jupyter notebooks for Python.
This webinar explains why PISA chips are inevitable, provides overview of machine architecture of such switches, presents a brief primer on the P4 language with sample programs for a variety of networks and demonstrates a powerful network diagnostics application implemented in P4.
Programmability in SDNs is confined to the network control plane. The forwarding plane is still largely dictated by fixed-function switching chips. Our goal is to change that, and to allow programmers to define how packets are to be processed all the way down to the wire.
This is made possible by a new generation of high-performance forwarding chips. At the high-end, PISA (Protocol-Independent Switch Architecture) chips promise multi-Tb/s of packet processing. At the mid- and low-end of the performance spectrum, CPUs, GPUs, FPGAs, and NPUs already offer great flexibility with performance of a few tens to hundreds of Gb/s.
In addition to programmable forwarding chips, we also need a high-level language to dictate the forwarding behavior in a target independent fashion. "P4" (www.p4.org) is such a language. In P4, the programer declares how packets are to be processed, and a compiler generates a configuration for a PISA chip, or a programmable target in general. For example, the programmer might program the switch to be a top-of-rack switch, a firewall, or a load-balancer; and might add features to run automatic diagnostics and novel congestion control algorithms.
How to Integrate Internet of Things with Webserver with Ionela
The project is integrating several technologies, found during the investigation of Flyport :
- Web server
- Wifi connection
- Dynamic variables substitutions (in xml files)
- Ajax callbacks
- jQuery use case
- Dynamic Memory allocation (malloc/free) (see heap.s)
- Web service calls : for tweeter, thingspeak and nimbits
http://openpicus.blogspot.com/2012/01/flyport-web-controlled-simulator-tweet.html
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...InfluxData
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Telegraf
Network to Code, LLC is a network automation solution provider that helps companies transform the way their networks are deployed, managed, and consumed on a day-to-day basis by leveraging network automation, software development, and DevOps technologies and principles. They provide highly sought-after training and consulting services that integrate and deploy network automation technology solutions to improve reliability, security, efficiency, time to market, and customer satisfaction while reducing operational costs.
In this session Josh VanDeraa and David Flores from Network to Code will present how to monitor your network devices with Telegraf using both the SNMP and the gNMI input plugins. They will also present what the challenges are with ingesting the same type of data from different sources and how to remediate that by normalizing the data in Telegraf using processors.
PHYSICAL COMPUTING WITH RGB LED OR MATRIX
Today we enter a topic in programming called
embedded computing with the internet; we code a
RGB LED light on a Arduino board with a breadboard
on which we switch off or on the light by a browser
on an android device with our own web server and
their COM or socket protocols too.
Node-RED and Minecraft - CamJam September 2015Boris Adryan
This workshop uses the Node-RED framework as development tool for JavaScript. Building on functionality available for generic programming challenges, we’re going to use the communication standard TCP (Transmission Control Protocol) to interact with the Minecraft API (Application Programming Interface). The material is aimed at people who have had first experience with the Minecraft API on a Raspberry Pi (say, using Python), who now want to understand what's going on behind the scenes and what TCP, API and all those other acronyms mean. It also introduces flow-based programming concepts.
Weather data meets ibm cloud. part 3 transformation and aggregation of weat...Einar Karlsen
This IBM Developer article shows how to extract, transform and load weather data stored by IBM Cloud Object Storage using IBM SQL Query, pandas, Apache Spark, IBM Watson Studio and Jupyter notebooks for Python.
We code a RGB LED light on the Arduino board and a breadboard on which we switch off or on the light by a browser on an android device with our own web server and their COM protocols.
There are three main topics in here. First technologies – simply put, this part is mainly for early adopters. It’s about coding, developing toys, plugging in kettles on the web (and we and many others actually did that!).
The second part is about new ideas, prototyping and new technologies that are in the lab. It’s about research papers, and software philosophy, and about researchers worldwide. Third part is about end-users and products.
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docxfelicidaddinwoodie
15LLP108_Demo4_LedBlinking.pdf
1. Introduction
In Demo3, we have learned how to read sensor values of light, temperature and humidity of a node
and output these values to the console. In this demonstration, we will use the code from Demo3 and
learn how to turn on/off the LEDs and make them blinking regularly on the sensor node XM1000,
meanwhile to count how many times the LED has blinked and output the count to the console.
2. Timer
In order to make the blue LED on the XM1000 sensor node to blink in every half second (i.e. On 0.5S
and Off 0.5S), we also need a timer. Follow the instructions in Demo3 for configure and reset a timer.
We aslo need to create an infinite while() loop so that it runs our functions repeatedly, such as
counting the times the LED has blinked, output the counter’s value and actually turn on or off the
LEDs to make it blinking.
Please follow timer and while() loop structure in Demo3.
3. LED Blinking
To get access to the LED functionalities in Contiki, we need to include the LED header file in the
source code:
#include "leds.h" // file is in directory /home/user/contiki/core/dev
After the process begin, we have to initialise the LEDs on the sensor node by calling the following
function:
leds_init(); // Initialise the LEDs
And finally we can turn on, off, or blink the LEDs by the following functions:
void leds_on(unsigned char leds);
void leds_off(unsigned char leds);
void leds_toggle(unsigned char leds);
void leds_invert(unsigned char leds);
For example, if you want to blink the Blue LED, yon need to call the toggle function as:
void leds_toggle(LEDS_BLUE); // Toggle the blue LED
4. Exercise
Modify the program from Demo3 with periodic timer to make the BLUE led blinking in every half
second, also to count the blinking times and output the counted number to the console.
Can your change the code so that the BLUE LED is lighted for 1 second and off for 0.5 second
periodically?
15LLP108 – Internet of Things and Applications
Lab Session 2: Demo 4 – LED Blinking
Prepared by Xiyu Shi
5. Source code
Here is the source code for reference
#include "contiki.h"
#include "leds.h"
#include <stdio.h> /* for printf() */
static struct etimer timer;
/*____________________________________________________*/
PROCESS(led_blinking_process, "LED Blinking Process");
PROCESS(LED_process, "LED process");
AUTOSTART_PROCESSES(&LED_process);
/*____________________________________________________*/
PROCESS_THREAD(LED_process, ev, data)
{
static int count = 0;
PROCESS_BEGIN();
etimer_set(&timer, CLOCK_CONF_SECOND/2); // 0.5S timer
leds_init(); // intialise the LEDs
while(1) {
PROCESS_WAIT_EVENT_UNTIL(ev==PROCESS_EVENT_TIMER); // wait for timer event
count++; // count the blinking times
process_start(&led_blinking_process, NULL); // to blink the BLUE Led
printf("Count: %d\n", count); // output the counte ...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...Andrey Karpov
One of the most relevant scenarios for using the PVS-Studio analyzer is its integration into CI systems. Even though a project analysis by PVS-Studio can already be embedded with just a few commands into almost any continuous integration system, we continue to make this process even more convenient. PVS-Studio now supports converting the analyzer output to the TeamCity format-TeamCity Inspections Type. Let's see how it works.
Internet of Things: Vehicular Tracking SystemPrasannPatel4
Nowadays, we have so many requirements in tracking the vehicles mostly for security purpose and for lost vehicle. We can achieve it if we have installed GPS in our vehicle as there is increased access to the global positioning system (GPS) has given enterprises a way to directly track, monitor and manage their most important assets. Live GPS vehicle tracking is all about having useful information regarding your fleet readily available to you. Not just any data, but data that is timely and accurate. Knowing where your vehicles and assets are at all times helps you regain control of your fleet operations. You will know how fast the vehicle was driven, where and when the vehicle stopped, and for how long. The cost of fuel is always a concern, and fuel savings continue to be fundamentally important in running a successful fleet operation. In most vehicle operations fuel expenses account for at least 32% of operating costs, so fuel monitoring & management is the logical place to start in order to reach fuel efficiency.
There are so many applications for vehicle tracking system. For example, Transport companies can use it to track their vehicles. Also, car rental companies can check status of their given rental cars. By just installing this system, logistics and fleet operators can stay updated by the minute. In short, any enterprise working in field of transporting any goods or service may prefer to apply this to their system to get notified.
In this project we will send the location coordinates attached in the link to Google Maps with your Vehicle’s Location. We will also be able to track the vehicle speed stoppages, trailer temperature and fuel level in the tank along with driver information.
Using the Flyport Wi-Fi embedded webserver, the user can anytime control the hardware I/O status and change the Wi-Fi network parameters.
http://openpicus.blogspot.com/2012/02/flyport-wi-fi-webserver-with-wi-fi.html
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Monitoring Java Application Security with JDK Tools and JFR Events
IoT with OpenPicus Flyport
1. Page | 1 9-Feb-12 JMLambert V1.0
IoT with OpenPicus Flyport :
Temperature/Pressure with BMP085
I2C LCD setup
Use case of Pachube and Paraimpu
2. Page | 2 9-Feb-12 JMLambert V1.0
Introduction
After the previous exercise with a Flyport Simulator connected to the web services, I will expose the experience and
solution of the following problem :
- Acquire Temperature & Pressure of a BMP085 device on a I2C bus
- Set the Real Time clock to the web time and use an alarm to acquire regularly the measurements
- Send the measurements to some Cloud storage, (I have integrated successfully NimBits, ThingSpeak, Paraimpu
and Pachube…)
- Display the curves of the measurements on the web page of the Flyport.
- Setup a LCD display HD44780 connected to the Flyport with I2C bus, thanks to I2C driver chip that is easy and
low cost and need less wires.
- Display some values on the local LCD as a “weather station”…
As explained above, I tried different Web Services to store the data, and Pachube seems quite good as it allows a very
easy graphing out of the data.
But Pachube is not able to process the Data and generate alerts (it seems) as easy as with ParaImpu
I chose to create a Pachube sensor in Paraimpu, and a connector inside Paraimpu that will tweet a message when an
alert is raised. We will see how.
I2C Bus & BMP085 acquision programming.
I connected the BMP085 directly on the Flyport, as it handles already on board the pullup.
I used the few libraries from the OpenPicus Download content :
- OP-LIB - i2c Helper rev1.0.zip
- LIB - BMP085 temperature sensor_rev1.0.zip
After some initial issue on the I2C reading, I fixed the soldering…
I just connected the required wires : GND+VCC + I2C Bus : SCL+SDA
3. Page | 3 9-Feb-12 JMLambert V1.0
Web time & RTCC Programming
The objective is to get the current time from an external web site (always included in a response), then set the time in
the RTCC and create alarms from the RTC at regular interval to perform the acquisition and sensor data transmission to
the storage (not too often)
Get the time from a web site header : www.google.com
In aim to get the time, the simpler is to make a POST request to a site, and analyses the header response.
Then you extract the fields and use them to initialize the RTCC.
4. Page | 4 9-Feb-12 JMLambert V1.0
Then, the time will be set in the RTCC and next steps :
5. Page | 5 9-Feb-12 JMLambert V1.0
I2C Bus & LCD HD44780
I used also the I2CHelper library as above, but I needed to create a new function :
New function : I2CSendString()
To handle the LCD, I added a new function in complement to the I2CHelper : I2cSendString()
This function is necessary to send messages to the I2C LCD and handles the split of messages within the max size of the
I2C buffer (generally 32, but it is a parameter)
LCD Display organization
In aim to put some flexibility in the way to create and eventually change the content of the display dynamically, I have
gone through some descriptions data.
6. Page | 6 9-Feb-12 JMLambert V1.0
This function is the one that will prepare the right strings in the display buffer for the iFieldNum field.
The above pointers are filled with Malloc to allocate the right size to the array.
I put 2 sets of strings, the one Requested, that is prepared with the above formatting elements and the one Content
that is filled after the LCD is updated.
This allows sending messages to the LCD only when a char has changed, and reduce the number of useless I2C message.
If we put the time HH:MM::SS, anyway, the update will be at least each second, but if you put only minutes, then the
message will only be sent every minute or if a displayed measure changes.
LCD I2C Controller BV4208
http://www.i2c.byvac.com/downloads/BV4208%20DataSheet.pdf
A set of commands is declared for this driver that is quite simple.
The LCD I2C Driver is also containing a EEPROM, that may be used for preset messages, but also to store your own
params independently of the OpenPicus file system.
7. Page | 7 9-Feb-12 JMLambert V1.0
We will use the I2CHelper library completed as described above to send long strings.
Note : I am preparing a library for that chip, but as I did not received the LCD from my order, I cannot test it…
This will be in the V2 of the document.
8. Page | 8 9-Feb-12 JMLambert V1.0
Pachube Setup & use
Pachube is a place to collect Sensor feeds, and allow their presentation in graphs.
Sensor declaration
You need to declare your sensor (Feed) that may contain several datastreams.
The feeds is at the url: /feeds/<feednumber> and you will have some access keys.
API Keys & Access control
You may have generic keys or specifics that have their own restrictions, (for example the key can be used to update only
one datastream, or you may allow only one IP address as origin, as well for getting the data, you have some access
controls.
For example : Here I create a key that would be able to UPDATE only the pressure datastream of the feed 47332
Then the Key provided will be put in the URL of access for the action (PUT/GET/DELETE etc) in the http header field
X-PachubeApiKey:
9. Page | 9 9-Feb-12 JMLambert V1.0
You may also regenerate the key, if you do not know if your key has been compromised.
The http requests are well documented in the API manual of Pachube here https://pachube.com/docs/
Once you have declared your feed, your datastreams (with an ID that will be used in the API call), and you have got the
key allowed to access the stream, you will need to put them in your program.
Web service format
What is interesting is that you may use several formats to update the streams : JSON, XML or CSV
For easy cases, it if obvious that the CSV is preferred.
The selection of the format is made at the URL level
http://api.pachube.com/v2/feeds/1977/datastreams/1.csv
For CSV the data string will contain one value per line (each line separated by “rn”)
Example : “1,20.5rn2,1013.0rn” means assign 20.5 to the datastream 1 and 1013.0 to datastream 2.
In this project, I construct this string that will be sent to the api.pachube.com url via a PUT request :
sprintf( tmpString,
"PUT %s HTTP/1.1rnHost: %srnAccept: */*rnContent-Type: text/csvrnX-PachubeApiKey:%srnContent-Length:
%drnConnection: closernrn%s", RemoteURL, ServerName, PachubeKey, strlen(buf), buf );
10. Page | 10 9-Feb-12 JMLambert V1.0
Pachube Graphing
By default, Pachube proposes a graph of all datastream like that :
You may tune the graphic by the parameter button and generate a URL of the result to include in your Flyport webpage.
Your browser will get the URL from the flyport, but will get the display from the Pachube site.
https://api.pachube.com/v2/feeds/47332/datastreams/1.png?width=730&height=250&colour=%23f15a24&duration
=1day&show_axis_labels=true&detailed_grid=true&timezone=UTC
The duration is a parameter that you may manually change or even put a dynamic field inside to change that
dynamically (~my_duration~) to replace the 1day above by a choice you may integrate in your web page. (eg: popup)
Triggers/ Alerts
You may have some triggers on some datastream, to generate alerts in twitter or SMS.
I have tested the SMS alert, but not the tweet.
There are several applications around Pachube that you may explore too.
Interface with Paraimpu
Paraimpu is competitor of Pachube (beta)
I have successfully connected my flyport to Paraimpu, but it is not featuring graphing yet.
So I choosed Pachube for data & graphing, and tried Paraimpu for the tweets management;
Identically to Pachube, you need to declare a sensor in Paraimpu and get a key to use the web service to publish your
sensor data.
There is an OpenPicus sensor template that you may use. This is in fact providing a piece of C code that can be the
starter to make your sensor. The API key is included in the C code, and is not available in the Web Page. I have
requested the change, as this seems not the best choice…
In this project, the Pachube is seen as a sensor itself, and data are gathered from Pachube.
Then I have declared a twitter Actuator with my twitter account.
11. Page | 11 9-Feb-12 JMLambert V1.0
And the last point is the connection that is making the link between the sensor data and the actuator :
You may have a message going to your actuator depending on the value received on the sensor.
Here I just put a message depending on the temperature.
You may create a message with smart content to have a script interpreted in your flyport for example.
12. Page | 12 9-Feb-12 JMLambert V1.0
Misc
I used the malloc/free to manage the dynamic memory allocation.
I just added the heap.s file in the project directory to create a heap of 2000bytes.
Then you just need to declare pointers and allocate memory that you assigned to that pointer.
Standard example :
This is quite useful for the http requests of body that do not need to be kept very longtime.