Giter VIP home page Giter VIP logo

drv2667's Introduction

Top Langs github stats

drv2667's People

Contributors

hideakitai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tymeorama

drv2667's Issues

Examples do not compile on arduino uno

Hi,

Thank you for sharing your code, but i can't get it to work on arduino uno.

The examples do not compile without modification.
I can compile the example_uno by replacing the SynthChunk struct by Synthesizer, removing the begin and replacing setSynthsizer by addSynthesizer, but i am not sure it is correct and it does not appear to work.

Could you provide a functionnal example?

Stops working after power cycle

I am using this library with an I2C mux. In the simple code below, the motor buzzes every 3 seconds until I power cycle, at which point it stops working unless the code is reflashed. By the way, I am using a SAMD51J19a chip (like the one on the Adafruit Feather) and an Adafruit Feather M4 bootloader on custom board.

#include <Wire.h>
#include "DRV2667.h"
#include <SparkFun_I2C_Mux_Arduino_Library.h>       
QWIICMUX myMux;
DRV2667 drv;

void setup()
{   

struct EmbeddedDevices::DRV2667::Synthesizer synth {
    {255, 0x17, 10, 0x12},
};

  
 Wire.begin();
 myMux.begin(); 

  if (myMux.begin() == false)
  {  
    while (1);
  }
 
  myMux.setPort(3); //Connect master to port labeled '1' on the mux
     drv.attatch(Wire);
     drv.addSynthesizer(synth); 
     drv.setWaveformOrderAndID(0,1); 
     drv.gain(DRV2667::Gain::D50V_A348dB);  
}

void loop()
{
        drv.play();
        delay(3000); //Wait for the wavkVkke to play;

}

Error while importing the library

Hi,
I get the following error while importing the DRV2667 library from arduino.

In file included from C:\Users\abhis\OneDrive\Documents\Arduino\sketch_nov30a\sketch_nov30a.ino:1:0:
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h:123:39: error: 'SynthChunk' does not name a type
void addSynthesizer(const SynthChunk* synthparams, const uint8_t size_of_synth)
^~~~~~~~~~
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h: In member function 'void EmbeddedDevices::DRV2667::DRV2667::addSynthesizer(const int*, uint8_t)':
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h:162:58: error: request for member 'amp' in '(synthparams + ((sizetype)(((unsigned int)i) * 2)))', which is of non-class type 'const int'
write(start_addr + 0, synthparams[i].amp);
^~~
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h:163:58: error: request for member 'freq' in '
(synthparams + ((sizetype)(((unsigned int)i) * 2)))', which is of non-class type 'const int'
write(start_addr + 1, synthparams[i].freq);
^~~~
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h:164:58: error: request for member 'cycle' in '(synthparams + ((sizetype)(((unsigned int)i) * 2)))', which is of non-class type 'const int'
write(start_addr + 2, synthparams[i].cycle);
^~~~~
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h:165:58: error: request for member 'envelop' in '
(synthparams + ((sizetype)(((unsigned int)i) * 2)))', which is of non-class type 'const int'
write(start_addr + 3, synthparams[i].envelop);
^~~~~~~
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h: At global scope:
C:\Users\abhis\OneDrive\Documents\Arduino\libraries\DRV2667/DRV2667.h:299:50: error: 'SynthChunk' in namespace 'EmbeddedDevices::DRV2667' does not name a type
using DRV2667Effects = EmbeddedDevices::DRV2667::SynthChunk;
^~~~~~~~~~
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

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.