| Electronic Components Datasheet Search |
|
DEV-13042 Datasheet(PDF) 5 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-13042 Datasheet(HTML) 5 Page - SparkFun Electronics |
|
5 / 9 page ![]() /************************************************************* *************** * SparkFun_PWM_Edison_Block_Example.cpp * Example code showing how to use the SparkFun PWM Edison Blo ck * Mike Hord @ SparkFun Electronics * 9 June 2015 * https://github.com/sparkfun/SparkFun_PWM_Block_for_Edison_C PP_Library * * This file is a demonstration program showing the various fu nctions that we've * provided for working with the PCA9685 IC on the SparkFun PW M Edison Block. * It uses an RGB LED and a small servo motor to show what th e library can do. * * Resources: * Requires Intel's MRAA framework. This can be downloaded fro m either the * GitHub site (https://github.com/inteliotdevkit/mraa) or i n prebuilt form * from http://iotdk.intel.com/sdk/mraaupdate/. * * Development environment specifics: * Developed in the Intel iotidedk Eclipse on Win 7 (v1.0.0. 201502201135) * Using libmraa v0.6.2 * On Edison pokylinux image build ww1815 * * This code is beerware; if you see me (or any other SparkFu n employee) at the * local, and you've found our code helpful, please buy us a r ound! * *********************************************************** *****************/ #include "mraa.hpp" #include "SparkFun_pca9685_Edison.h" #include <iostream> #include <unistd.h> using namespace std; // These channel definitions mirror the ones used in the PWM B lock hookup guide. #define SERVO 0 #define RED 2 #define GREEN 3 #define BLUE 4 // Uncomment one or both of these defines to enable the approp riate demo. Do // note servo motors and LEDs are best used at different freq uencies and // polarities, so hooking both at once will give you bad resu lts. #define SERVO_DEMO //#define LED_DEMO // main() runs once and completes; there's no infinite loop he re. Do note, // though, that whatever settings you write to the PWM modul e will persist Page 5 of 9 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |