GithubHelp home page GithubHelp logo

jessamyt / led-blink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from viam-labs/led-blink

0.0 0.0 0.0 65 KB

Introduction to the basics of programming hardware using the Viam Python SDK by making an LED blink.

License: Apache License 2.0

Python 45.39% Go 54.61%

led-blink's Introduction

LED-Blink

In this post, you will be introduced to the basics of programming hardware using the Viam SDK by making an LED blink. This will allow you to write Python or Golang code to make an LED connected to the GPIO of a Raspberry Pi blink. This tutorial is a good introduction to Python programming, and developing code for hardware like robots and IoT devices.

A GIF of the completed project showing a blinking blue LED connected to a Raspberry Pi with jumper cables.

Circuit Diagram

For reference, the circuit you are building for this tutorial looks like this:

Circuit diagram showing a Raspberry Pi with a red connector running out of GPIO pin 8 to a 100-ohm* resistor*. The resistor is connected to the long lead of a red LED bulb. Finally, a blue connector connects the short lead of the LED to the ground connection on pin 6 of the Raspberry Pi GPIO pins.

Prerequisites

You will need the following hardware, tools, and software to complete this project:

Hardware

Software

Installation

  1. Install Viam Server on your Raspberry Pi.

  2. Clone this repo onto your development machine:

git clone [email protected]:viam-labs/LED-Blink.git

Python

  1. Install Viam Python SDK on your computer.

  2. Update the payload and address information in blink.py. You can your information from the Connect tab of the Viam App.

  3. Run your code!

python3 python/blink.py

Go

  1. Install Viam Go SDK on your computer.

  2. Update the payload and address information in blink.go. You can your information from the Connect tab of the Viam App.

  3. Run your code!

go run go/blink.go

Contributing TLDR

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

led-blink's People

Contributors

joekarlsson avatar

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.