Updated makefiles and paths to make a .zip file with demo contents
This commit is contained in:
parent
882f340f17
commit
f2434b53be
|
@ -1,16 +1,31 @@
|
||||||
|
|
||||||
|
ifndef CONTIKI
|
||||||
|
CONTIKI = ../..
|
||||||
|
endif
|
||||||
|
|
||||||
|
zip: all jar
|
||||||
|
rm -rf contiki-energest-demo
|
||||||
|
mkdir contiki-energest-demo
|
||||||
|
cp nodeid/*.ihex contiki-energest-demo
|
||||||
|
cp energest-demo.ihex contiki-energest-demo
|
||||||
|
cp -r handouts contiki-energest-demo/
|
||||||
|
mkdir contiki-energest-demo/tools
|
||||||
|
cp -r $(CONTIKI)/tools/sky contiki-energest-demo/tools
|
||||||
|
cp dist/*.jar contiki-energest-demo
|
||||||
|
cp Makefile.contiki-energest-demo contiki-energest-demo/Makefile
|
||||||
|
zip -r contiki-energest-demo.zip contiki-energest-demo
|
||||||
|
|
||||||
all: burn-nodeids javaapp energest-demo.ihex
|
all: burn-nodeids javaapp energest-demo.ihex
|
||||||
|
|
||||||
burn-nodeids:
|
burn-nodeids:
|
||||||
(cd nodeid; $(MAKE))
|
(cd nodeid; $(MAKE))
|
||||||
|
|
||||||
|
jar:
|
||||||
|
ant jar
|
||||||
|
|
||||||
javaapp:
|
javaapp:
|
||||||
ant compile
|
ant compile
|
||||||
|
|
||||||
ifndef CONTIKI
|
|
||||||
CONTIKI = ../..
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Ensure that ./contiki-conf.h is included
|
# Ensure that ./contiki-conf.h is included
|
||||||
CFLAGS+=-I.
|
CFLAGS+=-I.
|
||||||
|
|
||||||
|
|
13
examples/energest-demo/Makefile.contiki-energest-demo
Normal file
13
examples/energest-demo/Makefile.contiki-energest-demo
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
CONTIKI=.
|
||||||
|
-include tools/sky/Makefile
|
||||||
|
|
||||||
|
upload-node-%:
|
||||||
|
$(MAKE) sky-reset burn-nodeid-$*.upload
|
||||||
|
$(MAKE) sky-reset
|
||||||
|
sleep 6
|
||||||
|
$(MAKE) sky-reset energest-demo.upload
|
||||||
|
|
||||||
|
upload-sink: upload-node-41
|
||||||
|
|
||||||
|
rundemo:
|
||||||
|
java -jar energest.jar /dev/com$(CMOTES)
|
82
examples/energest-demo/README
Normal file
82
examples/energest-demo/README
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
This directory contains the compiled code for the Contiki energy
|
||||||
|
estimation demonstration for ACM SenSys 2007. More information is
|
||||||
|
available in the handouts/ directory and at the Contiki website:
|
||||||
|
|
||||||
|
http://www.sics.se/contiki/
|
||||||
|
|
||||||
|
* INSTALLATION
|
||||||
|
|
||||||
|
Cygwin and Java (JRE) needs to be installed. The demo has been tested
|
||||||
|
on Microsoft Windows, but probably works under Linux too.
|
||||||
|
|
||||||
|
You need between two and eight Tmote Sky boards to run the demo: one
|
||||||
|
sink and between one and seven nodes. The nodes are numbered from 42
|
||||||
|
to 48, and 41 is the sink node.
|
||||||
|
|
||||||
|
Step 1: Unpack the zip file
|
||||||
|
|
||||||
|
unzip contiki-energest-demo.zip
|
||||||
|
|
||||||
|
Step 2: Change directory to the demo directory
|
||||||
|
|
||||||
|
cd contiki-energest-demo
|
||||||
|
|
||||||
|
Step 3: Connect the sink node to the PC. Remove all other Tmote Sky
|
||||||
|
nodes from the PC.
|
||||||
|
|
||||||
|
Step 4: Upload Contiki to the sink:
|
||||||
|
|
||||||
|
make upload-sink
|
||||||
|
|
||||||
|
Step 5: Remove the sink node from the PC.
|
||||||
|
|
||||||
|
Step 6: Connect one of the non-sink nodes to the PC
|
||||||
|
|
||||||
|
Step 7: Upload Contiki to the node:
|
||||||
|
|
||||||
|
make upload-node-42
|
||||||
|
|
||||||
|
Step 8: Remove the Tmote Sky from the PC.
|
||||||
|
|
||||||
|
Step 9: Insert batteries into the Tmote Sky. The red LED should light
|
||||||
|
up.
|
||||||
|
|
||||||
|
Step 10: Repeat step 6 to step 9 for all non-sink nodes. Replace "make
|
||||||
|
upload-node-42" with "make upload-node-43", "make
|
||||||
|
upload-node-44", and so on.
|
||||||
|
|
||||||
|
Step 11: Insert the sink node to the PC
|
||||||
|
|
||||||
|
Step 12: Run the Java program:
|
||||||
|
|
||||||
|
make rundemo
|
||||||
|
|
||||||
|
NOTE: this uses the first Tmote Sky it finds as a
|
||||||
|
sink. Therefore, make sure that only one Tmote Sky (the sink) is
|
||||||
|
inserted.
|
||||||
|
|
||||||
|
* DEMO DESCRIPTION
|
||||||
|
|
||||||
|
Contiki continuously estimates the energy consumption of the
|
||||||
|
system. In this demonstration, seven Tmote Sky nodes, running Contiki,
|
||||||
|
estimates their energy consumption and send their power to a sink
|
||||||
|
node. The sink node is connected to the PC, and reports the nodes'
|
||||||
|
power to a Java program. The Java program shows the nodes' power
|
||||||
|
consumption for the last second.
|
||||||
|
|
||||||
|
When pushing the button on the nodes, they cycle through seven states
|
||||||
|
as below. This is reflected by their power consumption, as shown in
|
||||||
|
the Java program. The different states are:
|
||||||
|
|
||||||
|
* Red LED: sending one packet per second
|
||||||
|
* Green LED: radio listen 1% duty cycle
|
||||||
|
* Green, red LEDs: radio listen 10% duty cycle
|
||||||
|
* Blue LED: radio listen 100%
|
||||||
|
* Blue, red LEDs: radio listen 10%, CPU low-power mode disabled
|
||||||
|
* Blue, green LEDs: sending data 1.2 kilobytes/second
|
||||||
|
* Blue, green, red LEDs: sending data 12 kilobytes/second
|
||||||
|
|
||||||
|
When sending data, the radio is turned on for a while before the
|
||||||
|
transmission to check if it is possible to send the packet. This is
|
||||||
|
the reason why energy is spent on radio listening even when the nodes
|
||||||
|
are only sending data.
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: Demo.java,v 1.2 2007/10/25 18:43:18 adamdunkels Exp $
|
* $Id: Demo.java,v 1.3 2007/11/06 14:46:14 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,8 +77,8 @@ public class Demo extends JPanel {
|
||||||
public static final int TOTAL_HEIGHT = 300;
|
public static final int TOTAL_HEIGHT = 300;
|
||||||
public static final int TOTAL_WIDTH = 900;
|
public static final int TOTAL_WIDTH = 900;
|
||||||
|
|
||||||
public static final String SERIALDUMP_WINDOWS = "../../../tools/sky/serialdump-windows.exe";
|
public static final String SERIALDUMP_WINDOWS = "./tools/sky/serialdump-windows.exe";
|
||||||
public static final String SERIALDUMP_LINUX = "../../../tools/sky/serialdump-linux";
|
public static final String SERIALDUMP_LINUX = "./tools/sky/serialdump-linux";
|
||||||
|
|
||||||
public static final int HISTORY_MAX_SECONDS = 120;
|
public static final int HISTORY_MAX_SECONDS = 120;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue