Search results

  1. D

    Teensy 3.2 - Wrong (?) readings from mcp23017/i2c

    No words.. It is incredible the time that is lost for stupid mistakes :( Thank you ! Daniele.
  2. D

    Teensy 3.2 - Wrong (?) readings from mcp23017/i2c

    Hello guys, I'm trying to read pin status of a mcp23017 in one shot using the Adafruit_mcp23017 library (https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library); The sketch: #include <Adafruit_MCP23017.h> /* Our I2C MCP23017 GPIO expanders */ Adafruit_MCP23017 mcp; void setup() {...
  3. D

    teensy-3.2, mcp23017 with encoders & interrupt..

    Trying new libs Hello guys, after almost a year I'm still here..:cool: Now I'm trying this lib: https://github.com/maxgerhardt/rotary-encoder-over-mcp23017 I've the polling example running fine with 1 encoder. How to handle buttons ? For 16 encoders, I'would use 3 mcp: 2 for encoders and 1 for...
  4. D

    teensy-3.2, mcp23017 with encoders & interrupt..

    This sketch: http://www.g7smy.co.uk/2014/08/rotary-encoders-on-the-i2c-bus/ with polling instead of interrupt, works. So something in interrupt setup is not ok in previous sketch.. :(
  5. D

    teensy-3.2, mcp23017 with encoders & interrupt..

    Hi, I did all the changes you suggest me, nothing. I added some debug ouput and if I manually short interruptPin to gnd, the sketch works ! So the problem is on the the mcp side. I've: pin 10 (reset) to 3.3v with 10k resistor. I read 3,10v on pins 21, 22, 23 and 0v on pin 20. Thanks, Daniele.
  6. D

    teensy-3.2, mcp23017 with encoders & interrupt..

    HI guys, I'm trying to use this sketch: https://github.com/raspibo/I2C_rotary_encoder/blob/master/I2C_rotary_encoder.ino.. First of all, a basic sketch like this: https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library/blob/master/examples/toggle/toggle.ino works fine, so teensy and...
  7. D

    Help neede: Debouncing a button matrix

    What about Keypad library ? 4x4 matrix without additional IC: /* @file MultiKey.ino || @version 1.0 || @author Mark Stanley || @contact mstanley@technologist.com || || @description || | The latest version, 3.0, of the keypad library supports up to 10 || | active keys all being pressed at the...
  8. D

    convert midi note to note name

    Great ! Test sketch: String nname[] = {"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"}; int mname; int oc; void setup() { Serial.begin(9600); } void loop() { Serial.println("Start"); delay(100); int i; for (i=0; i<=127; i++) { oc = i/12; mname = i%12...
  9. D

    convert midi note to note name

    Hi, how to convert mdi note to note name? 0 ->C0 51 -> D#3 .. First thing that comes to my mind is an big array of string: string name[] ={"C0","C#0,"D0"....} Are there better alternatives ? Thanks, Daniele.
  10. D

    How to use encoders as pot

    Sorry, my mistake. int32_t enc1_val = 0; needs to be outside setup(), otherwise there's a scope error in loop(). Last question, is there a way to rewrite the encoder value ? Something like enc::value(newvalue). Daniele.
  11. D

    How to use encoders as pot

    Thanks ! Example sketch with 4 counts default config works fine ! But I' have some trouble make it working in a real sketch. I would call read() inside loop() but with begin() inside setup(), there's a classic scope error. If I put begin() outside setup(): "specializing member...
  12. D

    How to use encoders as pot

    What exactly ? As I wrote, with Encoder lib, I get 4x count (as expected..). Do I need QuadDecode lib from linked thread ? Or is about polling vs interrupt ? Thanks, Daniele.
  13. D

    How to use encoders as pot

    Hi guys, I want to use few encoders as pot, it's a midi controller so at the end, I need to read 0-127. Encoders are cheap ALPS. With the encoder lib, I get 4 values for each step (1 2 3 4 - 5 6 7 8...). Is there a way to increase/decrease a counter by 1 (or any fixed value) for each step ? Do...
  14. D

    Teensy 3.1 Midi - USB Interface: 1 in+2 Out/Thru (split) + Midi Controller

    Simplified midithru HI guys, for a simple midithru (serial<->usb), do I need the whole midithru() function posted in this thread or can be semplified ? A very simple "pass everything as is". Thanks, Daniele.
  15. D

    Node Red / Audio System Design Tool Modification

    Hi, ehm.. ERR_CONNECTION_TIMED_OUT Daniele.
  16. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Right, 5v. So you need 5v for the input part. Not sure about the output.. Do you already have that board ? Daniele.
  17. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Why 5v ? 3.3v is ok for midi output. Daniele.
  18. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Two more questions before start soldering.. Can I get 3.3v from the 5v with voltage divider (47k+91k)? One wire less.. Can I attach a led to show midi activity ? I think that should be ok to attach the led to the output pin with a 330ohm resistor.. Same on the midi output ? Thanks, Daniele.
  19. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Thanks Paul, works fine with 3.3v. A bit ugly but it's only for a quick test. Daniele.
  20. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Well my 6n137 is this: 6N137.pdf and is 5v. So what to do ? Sorry for these silly questions but I came back to this hobby after 20 years so I need to relearning almost everything :( Thanks, Daniele.
  21. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Output done! Used 2 62 ohm resistor 'cause I don't have 0.5w resistor right now.. Tomorrow I'll test the input. I still don't understand if the 6n137 works with 3.3v. In some datasheet is 4.5-5.5 but in others like this: 6N137.pdf is 3.3v capable.. mine is anonymous.. who knows.. we'll see...
  22. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    I suspected it... asked just to be sure. The optocoupler 6n137.. I guess the answer ;) Thanks guys ! Daniele.
  23. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Thanks and if may ask, what do you think about this: http://karg-music.blogspot.it/2016/01/midification.html. On midi out there is only 220 ohm resistor to 3.3v and the 6n137 is fed by 3.3v but the spec say 4.5-5.5v. Both wrong ? Daniele.
  24. D

    Midi In and Out - 3.3v ~ Let me know if I did it right

    Hi guys, I'm making a midi interface too and I have a doubt but for the output.. For the midi spec, with 3.3v, there should be a 10ohm 0.25w resistor from UART to pin 5 and 33 ohm 0.5w from v+ to pin 4 but from page: https://www.pjrc.com/teensy/td_libs_MIDI.html 47 ohm resistors (both) are...
  25. D

    i2c_t3.h versus Wire.h with LCD w/i2c backpack and teensy 3.2

    Which lib ? Hi guys, first post here so first of all, HELLO ! And sorry for my bad english. Now, I'm here with Teensy 3.2 and my first Lcd 16x2 with i2c adaptor based on PCF8574AT chip. So which lib ? Adafruit? This one: http://https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library...
Back
Top