Giter VIP home page Giter VIP logo

rpi.demo's Introduction

Pi.Demo

Connects the Adafruit 16-channel PWM/Servo Shield (PCA9685) to the Raspberry Pi via i2c.

Demonstrates the use of mono & c# to control a servo, stepper and 9V DC motor from the Raspberry Pi.

The project uses:

Circuit Diagram

Breadboard

A lego ping pong launcher was constructed to showcase the motors in action.

Breadboard

Requirements

The Visual Studio solution expects raspberry-sharp-io to be cloned into a sibling directory.

ie:

+
+--RPi.Demo
+--raspberry-sharp-io

SignalR

The code intially targeted Mono 2.x with a WinForms UI to allow interactive control of the motors (WinForms running in X-Windows). It now targets mono 3.x which was compiled on the pi so as to take advantage of hard float and enable the use of async/await. WinForms on mono 3.x is broken at the time of writing so a web based UI was required.

SignalR is demonstrated in two ways

  1. Client-Server-Client topology (eg: pi-IIS-iPhone)

SignalR hub is hosted on IIS 8 with two hubs: one hub for a web browser remote control client using jQuery mobile; a second hub for the pi itself to connect to via the signalR c# client. This works well, apart from the requirement of IIS 8 as the mediator. see:

rpi.console/rpiconsole.exe -m=SignalRTest
  1. Self contained/hosted console app, using Nancy, SignalR and NoWin.

SignalR on mono cannot host websockets and the transport falls back to Server Side Events. Response is very slow while dragging a slider backward and foward with several seconds lag before the server sees this response. Response is even slower using Katana as the web server. see:

rpi.nancy/rpi-nancy.exe

A video the ping pong launcher can be seen here.

Later Projects#

Other projects that make use of this code base... ##Alarm Clock ## An alarm clock. The source code is contained in this repo.

Alarm Clock

Lego Marble Sorter

A Lego marble pump & sorter using OpenCV. The source code in in another repo but references projects in this repo.

marble pump

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.