Git Product home page Git Product logo

perifericos's Introduction

perifericos

https://isocpp.org/wiki/faq/mixing-c-and-cpp#overview-mixing-langs

http://renangreinert.blogspot.com/2011/08/extern-c.html

Parte do Raspberry (buttons e serial)

  • serial.c e serial.h são a parte da comunicação entre rpi e arduino
  • button.ccp faz a parte de manipulação de GPIO (buttons)
  • Necessário utilizar o extern "C" para integrar codigo C e C++
  • Para compilar seguir os seguintes passos:
  • gcc -c serial.c
  • g++ button.cpp
  • g++ button.o serial.o
  • Para executar utilizar o superuser, para nao dar problema na configuraçao dos GPIO-> sudo ./a.out

Parte do Arduino

  • Botão1 -> GPIO25 ligado ao pino B1

  • Botão2 -> GPIO24 ligado ao pino B2

  • Botão3 -> GPIO23 ligado ao pino B3

  • LED1 -> PB5 ligado ao pino BUF1

  • LED2 -> PB4 ligado ao pino BUF2

  • LED3 -> PB3 ligado ao pino BUF3

  • LED4 -> PB2 ligado ao pino BUF4

perifericos's People

Contributors

brandelli avatar

Watchers

James Cloos avatar  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.