npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

smart-pinhole-workshop

v0.0.11

Published

A nodeschool workshop to learn how smart (iot) things work.

Downloads

19

Readme

A nodeschool workshop to learn how smart (iot) things work.

General Prerequisites

  • A working knowledge of JavaScript.
  • No knowledge of hardware/Arduino is assumed.
  • A Unix based environment - Mac OSX or a Linux flavour.

Install & run

# Install
npm install -g smart-pinhole-workshop

# Run
smart-pinhole-workshop

Overview

The mission is to create a smart Pinhole Camera while covering core Internet of Things principles.

And, you dont need an Arduino or a Pinhole Camera to get going. We simulate as much as possible. Generally, the challenges will take up 1 to 2 hours.

Also, once you have the Arduino and camera just setup the hardware on the side. This is enough to showcase what a smart camera can do.

Do let us know if you're having any problems. We really want to make this a pleasant learning experience.

Coming soon is our first all in one DIY smart product kit. Stay in touch to find out when its ready.

How smart?

Our objective is to detect the level of brighness in a space. Then use some basic calculations to tell a photographer how long the camera film should be exposed for.

The end result

Camera, arduino and lightmeter setup

How will it work?

We will sense brightness using Johnny Five and a cheap light sensor on the Arduino. Then publish that data over the internet and create a real time UI to showcase the optimal film exposure time for a photo.

Sensors, messaging, user interface

The workshop will pose a challenge, and test your solution.

You can use your favourite text editor to create a solution.

Each of your solutions can be run directly as a node program like this:

Running the workshop

Again, to start fast NO Arduino OR Pinhole Camera is needed for this workshop.

Sample data is pushed through the solution to simulate the experience.

But wire up an Arduino UNO, connect the USB and you can see your solution run for real.

For the Pinhole Camera, either make your own or get one from here.

Exhaustive bill of materials

Here's the list of all the materials to run your solution 100% end to end.

  • LED - http://node-ardx.org/electronics-primer#led [buy]
  • Photoresistor - http://node-ardx.org/electronics-primer#photoresistor [buy]
  • Resistor - http://node-ardx.org/electronics-primer#resistor [buy]
  • Breadboard - http://node-ardx.org/electronics-primer#breadboard [buy]
  • 3 Jump wires - https://en.wikipedia.org/wiki/Jump_wire [buy]
  • Arduino UNO [buy]
  • Pinhole Camera - make one / [buy one]

Pre-requisites for the Arduino

Flash your Arduino with Standard Firmata:

  • Connect the Arduino UNO to your PC using the USB Cable
  • Open the Arduino IDE, select: File > Examples > Firmata > StandardFirmata
  • Click the "Upload" button.
  • The text "Done Uploading" will appear once the upload is complete.

Having problems? Perhaps adjust one of the following.

  • Select : Tools > Board and ensure that "Arduino UNO" is selected.
  • Select : Tools > Serial Port and select another serial port. On a Mac the correct port may look like "/dev/tty.usbmodem:1411" or "/dev/cu.usbmodem:1411".
  • Check the USB Cable is connected - consider also trying a different cable.
  • You can also try pressing the Reset Button on the UNO.

They try the upload process one more time.

Feedback

Again, we love feedback! Let us know what you thought, good or bad.

Code style

To move towards a consistent style for nodeschool projects we use the .jshintrc as defined in learnyounode: https://github.com/rvagg/learnyounode/blob/master/.jshintrc

Your favourite jshint runner will work. And, a gulpfile is provided.

npm install -g gulp
gulp

Our thanks

Thanks to the brilliant work of @olizilla, @alanshaw & @achingbrain on tableflip/nodebot-workshop.

Your workshopper gave us the perfect foundation to build on!