var chart = new Chartist.Line('#savings_calculator .graph', {
series: [
[1, 1.6, 2.8, 2.7, 3.1, 3.4, 3.8, 4.5, 5.7, 5.6, 7.5, 9.5]
]
}, {
axisX: {
showLabel: false,
showGrid: false
},
axisY: {
showLabel: false,
showGrid: false
},
lineSmooth: false,
low: 0
});
// Let's put a sequence number aside so we can use it in the event callbacks
var seq = 0,
delays = 100,
durations = 10;
// On each drawn element by Chartist we use the Chartist.Svg API to trigger SMIL animations
chart.on('draw', function(data) {
seq++;
if(data.type === 'line') {
// If the drawn element is a line we do a simple opacity fade in. This could also be achieved using CSS3 animations.
data.element.animate({
opacity: {
// The delay when we like to start the animation
begin: seq * delays + 0,
// Duration of the animation
dur: durations,
// The value where the animation should start
from: 0,
// The value where it should end
to: 1
}
});
} else if(data.type === 'point') {
data.element.animate({
x1: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
x2: {
begin: seq * delays,
dur: durations,
from: data.x - 10,
to: data.x,
easing: 'easeOutQuart'
},
opacity: {
begin: seq * delays,
dur: durations,
from: 0,
to: 1,
easing: 'easeOutQuart'
},
});
}
});
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
mySerial.println("AT+RST");
mySerial.println("AT+GMR");
mySerial.println("AT+CWMODE_DEF=1");//_DEF
delay(50);
mySerial.println("AT+CWJAP_DEF=\"routerr\",\"1029384756\"");
delay(6000);
mySerial.println("AT+CIPSTART=\"TCP\",\"192.168.1.11\",80");
delay(50);
mySerial.println("AT+CIPSEND=43");
delay(50);
mySerial.println("GET / HTTP/1.1\r\nHost: 192.168.1.11\r\n\r\n\r\n\r\n");
//delay(5000);
//mySerial.println("AT+CIPCLOSE");
}
void loop()
{
if (Serial.available()) mySerial.write(Serial.read());
if (mySerial.available()) Serial.write(mySerial.read());
delay(10);
}
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.my.name" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Name</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
</widget>