diff --git a/RaspberryPiZero_node_rpio/index.html b/RaspberryPiZero_node_rpio/index.html new file mode 100644 index 0000000000000000000000000000000000000000..d5777116e715edf9ab12cc543ef97ef98c6c3734 --- /dev/null +++ b/RaspberryPiZero_node_rpio/index.html @@ -0,0 +1,36 @@ +<html> +<head> +<style> +pre code { + background-color: #eee; + border: 1px solid #999; + display: block; + padding: 20px; +} +</style> + + +</head> +<body> + +<h1>RaspberryPi Zero W with BCM2835</h1> + +<figure> +<img src='node_rpio.png'> +<figcaption>Ring oscillator with node-rpio.</figcaption> +</figure> + +<p>This ring oscillator uses the <a href='https://github.com/jperkin/node-rpio'>node rpio</a> from Jonathan Perkin. The code is available <a href='ring.js'>here</a>, or visible below.</p> + +<pre> +<code> +var rpio = require('rpio'); +rpio.open(3, rpio.OUTPUT); +rpio.open(5, rpio.INPUT); +while(1){rpio.write(3, 1-rpio.read(5) ); } +</code> +</pre> + +</body> + +</html> \ No newline at end of file diff --git a/RaspberryPiZero_node_rpio/node_rpio.png b/RaspberryPiZero_node_rpio/node_rpio.png new file mode 100755 index 0000000000000000000000000000000000000000..2906b51d4ab3bb2f0be5969b29c85305c8203b4e Binary files /dev/null and b/RaspberryPiZero_node_rpio/node_rpio.png differ diff --git a/RaspberryPiZero_node_rpio/ring.js b/RaspberryPiZero_node_rpio/ring.js new file mode 100644 index 0000000000000000000000000000000000000000..801a74f4e4f9165aa305d4eeedfd5dd4f244be98 --- /dev/null +++ b/RaspberryPiZero_node_rpio/ring.js @@ -0,0 +1,4 @@ +var rpio = require('rpio'); +rpio.open(3, rpio.OUTPUT); +rpio.open(5, rpio.INPUT); +while(1){rpio.write(3, 1-rpio.read(5) ); } \ No newline at end of file diff --git a/ring.json b/ring.json index bea7887edcbe2b7740acf8c3af1fe4e0fa959044..fc29eded5dc9421494380a7b8071bf9bcb321c4b 100644 --- a/ring.json +++ b/ring.json @@ -127,9 +127,19 @@ "subdirectory_path":"RaspberryPiZero_bcm2835", "dev_board_price":5.00, "dev_board_sales_link":"", - "ic_price":2.00, + "ic_price":0.00, "ic_sales_link":"", "ring_period":350 - } + }, + { + "name":"RPiZero, node rpio", + "serial_number":"", + "subdirectory_path":"RaspberryPiZero_node_rpio", + "dev_board_price":5.00, + "dev_board_sales_link":"", + "ic_price":0.00, + "ic_sales_link":"", + "ring_period":7648 + } ] } \ No newline at end of file