Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: ilium007

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    35
    Views
    541

    All working and bundled up into a class. Thanks...

    All working and bundled up into a class. Thanks again for all your help
  2. Replies
    35
    Views
    541

    I have gone and hit a wall again.... these ^&%*&&...

    I have gone and hit a wall again.... these ^&%*&& pointers

    The code in #31 was so elegant and compiled and worked perfectly on the ATMega328 as well as the Teensy 4.0. I then tried to extend it...
  3. Replies
    35
    Views
    541

    So this one is another Lambda function being...

    So this one is another Lambda function being passed to attachClick?
  4. Replies
    35
    Views
    541

    Out of interest, what would it look like? I'm...

    Out of interest, what would it look like? I'm interested in seeing all these different constructs.
  5. Replies
    35
    Views
    541

    I am happy with the simple 'cast to whatever...

    I am happy with the simple 'cast to whatever pointer type I'm using' approach. Thanks for all the input though!
  6. Replies
    35
    Views
    541

    Thanks but I want to remove the operations of the...

    Thanks but I want to remove the operations of the callback outside of my button class. I think the button class should be responsible for simply calling something else. In this first case it will be...
  7. Replies
    35
    Views
    541

    Thanks again for all the help!

    Thanks again for all the help!
  8. Replies
    35
    Views
    541

    But... I could go down this path instead of my...

    But... I could go down this path instead of my custom ATMega328 boards :D

    https://www.pjrc.com/store/ic_mkl02.html
  9. Replies
    35
    Views
    541

    Thanks, I'll do that. It keeps things I build...

    Thanks, I'll do that. It keeps things I build usable across ATMega's and the Teensy's.
  10. Replies
    35
    Views
    541

    That works and compiles for the Teensy. Thanks. I...

    That works and compiles for the Teensy. Thanks. I also wanted to use this for some of the smaller boards that run ATMega328's but functional is not available:


    fatal error: functional: No such...
  11. Replies
    35
    Views
    541

    Ahh yes, that old chestnut :|

    Ahh yes, that old chestnut :|
  12. Replies
    35
    Views
    541

    Using your code example I tried to access a...

    Using your code example I tried to access a variable inside the for loop. If I try to access 'buttonId' it won't compile but it is happy to access the global variable 'someInt'


    #include...
  13. Replies
    35
    Views
    541

    Trying to get the Lamda functions working but...

    Trying to get the Lamda functions working but need to pass in the int value as below. I have been reading about the need to 'capture' variables passed in to the Lamda but I can't get it to work:

    ...
  14. Replies
    35
    Views
    541

    Awesome!! Lamdas are something I have heard...

    Awesome!! Lamdas are something I have heard people talk about but hadn't yet investigated. I will pull this apart tonight. I love this forum!
  15. Replies
    35
    Views
    541

    That’s awesome. Thanks for your patience and...

    That’s awesome. Thanks for your patience and excellent explanation.

    For my testing this is what the callback looks like now:


    void callbackClick(void *buttonId) {
    int* _buttonId = ((int*)...
  16. Replies
    35
    Views
    541

    I have been thinking about this some more.... ...

    I have been thinking about this some more....

    I may look at re-writing the OneButton library but for now I'd like to know if there is any other way of doing what I am attempting to do.

    The...
  17. Replies
    35
    Views
    541

    Thanks for the detailed reply. After spending a...

    Thanks for the detailed reply. After spending a few hours last night reading more about pointers I concluded that void pointers could be dangerous. In this case the state machine button library that...
  18. Replies
    35
    Views
    541

    Thanks so much. Makes a lot more sense now. I...

    Thanks so much. Makes a lot more sense now. I need to do a lot more reading.
  19. Replies
    35
    Views
    541

    19856 I wish I was smart :( Ok, so that...

    19856

    I wish I was smart :(

    Ok, so that works..... can you please explain in words suitable for my intellect the pointer magic going on here?

    Thanks :D
  20. Teensy 4.0 taking forever to upload from Teensyduino, then crashed OSX

    I am running OSX 10.15.4 and Teensyduino 1.51.

    Sketches (tiny 1Kb) are taking upwards of a minute to upload to the Teensy 4.0. I manually pressed the program button on the Teensy 4.0 and it...
  21. Replies
    35
    Views
    541

    I will give it a go, but the problem is that the...

    I will give it a go, but the problem is that the underlying OneButton class requires a void * as defined in its typedef for the callback function that gets passed in:


    typedef void...
  22. Replies
    35
    Views
    541

    Pointers... again

    I am stuck again. Take a look at the code below and please tell me why I can't get the testClick function to print "6". I have spent 2 days trying to work this out, looking at various resources...
  23. So the hacky way I have made it work is to invert...

    So the hacky way I have made it work is to invert the 'activeLevel' parameter that is passed to the OneButton tick(bool activeLevel) method if _buttonPressed == LOW (which I've hard coded in the...
  24. So I have worked out WHY this is happening, I...

    So I have worked out WHY this is happening, I just don't know how to fix it.

    The OneButton library is seeing an inverted signal. So in a resting state it thinks the button is held down.

    I am...
  25. Issues debouncing a button on an MCP23008 using OneButton library

    I am prototyping as project that's going to use a lot of I/O on a Teensy 4.0. I've started playing with an I2C MCP23008 and want to use the excellent OneButton library...
  26. Had *exactly* the same problems with the T4 on a...

    Had *exactly* the same problems with the T4 on a breadboard. I have VUSB cut and made up some 16AWG power leads soldered to 2 x pin headers and haven't had any issues since.
  27. I値l check when I知 back home on Friday.

    I値l check when I知 back home on Friday.
  28. I tried again using a lab power supply at 3.3v on...

    I tried again using a lab power supply at 3.3v on the 3.3v pin (circled) but haven’t tried the 3.3v on the other end of the board.

    I noticed that plugging/unplugging the USB cable when powered...
  29. Can't program Teensy 4.0 after Vin trace is cut and supplyng external 3.3v

    Hi - I have run into an issue whereby I can't program the T4 via USB after the Vin trace was cut and I supply 3.3v to the 3.3v pin on the board. The serial device does not show up on OSX in Arduino...
  30. Replies
    3
    Views
    238

    Ok thanks for the response. I must have read that...

    Ok thanks for the response. I must have read that list wrong.
  31. Replies
    3
    Views
    238

    Teensy 4.0 CAN interfaces

    The main page for the Teesny 4.0 (https://www.pjrc.com/store/teensy40.html) states that is has 2 CAN interfaces. The pinout diagram shows CTX1/CRX1, CTX2/CRX2 and underneath CTX3/CRX3. Are there 2 or...
  32. Thread: CANBus wiring

    by ilium007
    Replies
    3
    Views
    522

    Yes, I understand this. My question was about the...

    Yes, I understand this. My question was about the physical layout of the bus wiring in relation to the stubs as per both posts above.
  33. Thread: CANBus wiring

    by ilium007
    Replies
    3
    Views
    522

    To achieve this: 19314 Do I need to build...

    To achieve this:

    19314

    Do I need to build some PCB's like this (photoshopped):

    19315

    But then I find this project where each module looks like it is daisy chained from board to board:
  34. Thread: CANBus wiring

    by ilium007
    Replies
    3
    Views
    522

    CANBus wiring

    I'm a little confused on how to lay out CANBus wiring in a project I am working on. Everything I read talks about the CANBus having 'stubs' that need to be less than a certain length. I don't know...
  35. Replies
    6
    Views
    517

    Thanks Paul - learning more every day!

    Thanks Paul - learning more every day!
  36. Replies
    6
    Views
    517

    While I'm on the schematics, where is this diode...

    While I'm on the schematics, where is this diode connected to? It's floating in the current schematic? Is it just paralleled for current handling?

    19309
  37. Replies
    6
    Views
    517

    Thanks - found it in search results

    Thanks - found it in search results
  38. Replies
    6
    Views
    517

    Teensy 4.0 hardware / schematic question

    Hi - can someone please tell em the purpose of the P-channel MOSFET shown below? To me it looks as though the gate is permanently tied to GND which would mean the MOSFET is always allowing current to...
  39. Replies
    2
    Views
    405

    That should be what I'm after - thanks!

    That should be what I'm after - thanks!
  40. Replies
    2
    Views
    405

    Teensy 4.0 PCB dimensions / drawings

    Hi - just purchased a Teensy 4.0 to do some further CANBus prototyping. I need to throw together a PCB to hold some SN65HVD230 CANBus transceivers. Were can I get some drawings of the Teensy 4.0 PCB...
  41. Replies
    2
    Views
    405

    Timer1, Timer3 and PWM

    Hi just wondering why the Timer1 and Timer3 library only works with pins 3,4 and 29,30 but analogueWrite on the Teensy 2.6 works on pins 5, 6, 9, 10, 20, 21, 22, 23 ( Timer FTM0) and 2, 7, 8, 14, 35,...
  42. Replies
    2
    Views
    769

    Measuring PWM current

    Hi - I am using a Teensy 3.6 to generate a 20kHz PWM signal and need to measure current being consumed. I understand that measuring PWM current is difficult given you could be measuring at a PWM...
  43. Replies
    5
    Views
    375

    Thanks for the replies

    Thanks for the replies
  44. Replies
    5
    Views
    375

    Yes, its a quadrature encoder.

    Yes, its a quadrature encoder.
  45. Replies
    5
    Views
    375

    Encoder library help

    I am trying to get a rotary encoder working on a Teensy 3.2 and 3.6 - I have tried my code on both but the same happens.

    I am getting a count of 4 for each detent on a Bournes 24 position rotary...
  46. Encoder library velocity sense and debounce

    Hi - I have a few questions about the included encoder library. Is there and encoder debounce included . Do I need to worry about the encoder bouncing on state changes ? Also, if I wanted to...
  47. Replies
    10
    Views
    1,065

    Thanks guys ! This definitely answers my...

    Thanks guys ! This definitely answers my question. I think it痴 time I invested in an oscilloscope :(
  48. Replies
    10
    Views
    1,065

    Anyone with a more technical answer ?

    Anyone with a more technical answer ?
  49. Replies
    10
    Views
    1,065

    Teensy 3.6 native PWM frequency

    Hi - I知 playing around with a MC33926 Motor Driver (https://www.pololu.com/product/1213) and a Teensy 3.6. I want to drive the MC33926 at 20kHz but the Teensy site...
  50. Replies
    12
    Views
    1,650

    Ahh makes sense now

    Ahh makes sense now
Results 1 to 50 of 84
Page 1 of 2 1 2