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

Search:

Type: Posts; User: Bastiaan

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. hi I think i almost have the code fixed for...

    hi

    I think i almost have the code fixed for 1000 mseconds OFF,
    then 52ms x 10 pulses on and off with a 2ms shift between two channels.

    previous post shows the graphs and the way i understood...
  2. hi, for using two signals i splitted up the...

    hi,

    for using two signals i splitted up the FSM in two FSM which respresent their own channel.
    the first channel 0 is Clockwise as can been seen in post 36.

    the following attached signal...
  3. Hi Paul i took the weekend off, to get my...

    Hi Paul

    i took the weekend off, to get my head free.

    Thanks

    thanks a lot,

    so i wrote a simple program for one Output to start with.
    24611
  4. Hi i am trying to drive the direction of the...

    Hi

    i am trying to drive the direction of the current with the VNH5019
    over the OUTPUT Pins 2,3 from my teensy4.1

    sorry for the shadow on the pictures:

    Correct.

    Your system is different...
  5. Paul, Many thanks for your time,...

    Paul,

    Many thanks for your time, understanding, and your explanations.
    Really appreciated!

    The state machine: I only worked with small examples till now. Also including simple if statements....
  6. good morning, i played a bit with the...

    good morning,

    i played a bit with the ElapsedMillis();

    so far i got two signals that are shifted please see pictures:
    24520
    24521
    24522

    but the pulse train stops after a period of time of...
  7. good morning, i played a bit with the...

    good morning,

    i played a bit with the ElapsedMillis();

    so far i got two signals that are shifted please see pictures:
    24520
    24521
    24522

    but the pulse train stops after a period of time of...
  8. ok so i have CODE1 that does the following....

    ok so i have CODE1 that does the following.
    24513

    creates a pulse of 400us
    within a total time of 10ms.

    the second pulse is 800us long and has the same Totaltime of 10ms
    over and over.
  9. many thanks for that Paul, and preseverance in...

    many thanks for that Paul, and preseverance in helping me out.
    really appreciated.
  10. Ok interesting. Ill try a bit with an easy...

    Ok interesting. Ill try a bit with an easy example and a else if statement

    Or is better to use booleans to see if an if statement is run?

    And make a same check as the independent on off?
  11. thanks Paul, ill do that. ill remove the...

    thanks Paul, ill do that.
    ill remove the holdcount part

    ill start over and add some pictures.
    24509
    shows the following code:

    WORKS without Independent ON OFF
  12. so i am a bit further if i run this program, i...

    so i am a bit further

    if i run this program, i can create pulsewidth and TimeStamp. during this time stamp the pulsewidth of INA will be high for x micros.
    INB will be shifted with 400us and is...
  13. so i am a bit further if i run this program, i...

    so i am a bit further

    if i run this program, i can create pulsewidth and TimeStamp. during this time stamp the pulsewidth of INA will be high for x micros.
    INB will be shifted with 400us and is...
  14. would rather use this with millis. Iíll stick...

    would rather use this with millis.
    Iíll stick with that, I have a few function calls with SPI, currentsense encoder and TFTScreen in the background.

    I think this is a better start. For the INA...
  15. Hi Defragster, now its my turn, i didnt...

    Hi Defragster,

    now its my turn, i didnt understand a thing you just told me, no offense.
    never worked with ISR, had it in my studies but never worked with it.
    no clue what speeling is.

    il...
  16. of course i can tune them indepedent from each...

    of course i can tune them indepedent from each other

    but its a bit trickier, i have to set the On and OFF Time very low...

    any suggestions?


    int ledPin13 = 13; // the number of the...
  17. i thought combining the two independent millis...

    i thought combining the two independent millis into one would be proof much usefuller, why is it only reacting to the first If statement in the void loop?
    why cant i control the OnTimePulseClock...
  18. #define ENCODER_OPTIMIZE_INTERRUPTS #include...

    #define ENCODER_OPTIMIZE_INTERRUPTS
    #include <SPI.h>
    #include <elapsedMillis.h>
    #include <ButtonEvents.h>
    #include <Encoder.h>

    // digital IO pins.
    #define C_BLACK 0x0000
    #define C_BLUE ...
  19. Good morning, So as to speak I’ll try this...

    Good morning,

    So as to speak I’ll try this with elapsedmillis, I have more going on in my code. How do I check that the ONTime from the bald engineer link isn’t passed?


    int...
  20. Didnít had any luck today running this kind of...

    Didnít had any luck today running this kind of code inside an independent on off function
    Somehow I am misreading my signals from the teensy4.1.
    Iíll try it first thing in the morning!
  21. KISS problem setting Millis timed pulses during ON time

    I have one of those days that something is so simple,
    You can’t get your head around it.


    Simple Toggle



    Void setup()
    {
  22. Call function independent on off switch and repeat for loop

    Int independent_On_Off()
    {

    if ((ON_VNH5019 == HIGH) && (ElapsedOFF >= OFFTime1)) //OFFTime first
    {
    ON_VNH5019 = LOW;
    // ElapsedOFF=ElapsedOFF-OFFTime1;
    ...
  23. Replies
    0
    Views
    88

    Menu and encoder handling how?

    Hello guys,

    i am currently trying some stuff, i am using the st7735 with a teensy3.2 and encoder from Sparkfun. i am using the buttonEvent to scroll down and up(double click in the menu).
    ...
  24. Replies
    15
    Views
    401

    hi silverlock, had some other stuff to do....

    hi silverlock,

    had some other stuff to do.
    id expect that it would countdown from 3,2,1,0.
    but then it goes to 6:28:15.


    unsigned long Days = 0;
    unsigned long Hours = 0;
    unsigned...
  25. Replies
    15
    Views
    401

    so i tried the stuff you recommended. ...

    so i tried the stuff you recommended.





    Int long Days = 0;
    Int long Hours = 0;
    Int long Min = 0;
    Int long Sec_add = 3;
  26. Replies
    15
    Views
    401

    Ok , ill write you tomorrow evening.

    Ok , ill write you tomorrow evening.
  27. Replies
    15
    Views
    401

    Probably a warning, no error, program runs. ...

    Probably a warning, no error, program runs.

    Iíll switch the if statement so that the condition is changed.

    still I think the problem is here? DisplaySec=Sec%60;
  28. Replies
    15
    Views
    401

    i changed it to if (millis() -...

    i changed it to


    if (millis() - startTime >= oneSecond)
    {
    Sec--;
    startTime += oneSecond;
    if (Sec >= 0)
    {
  29. Replies
    15
    Views
    401

    i think i know the problem where it occurs, its...

    i think i know the problem where it occurs, its the sec =sec+ part that adds extra seconds to the loop and thus creates a mismatch.
  30. Replies
    15
    Views
    401

    Simple Countdown, but something is amiss.

    hi guys,

    i am trying to build a simple countdown with a teensy3.2 with the millis function: but somehow the code is not responding properly could you see where the problem is? the code runs fine...
  31. it works thanks a million!

    it works thanks a million!
  32. so i changed the max31855 cpp and h file, as...

    so i changed the max31855 cpp and h file, as suggested on github. still getting zero values, and no errors.
    i tried adding the spi.begin(); but that didnt do anything as well.

    i restarted the...
  33. Darn your faster;), I was almost ready typing to...

    Darn your faster;), I was almost ready typing to their support.
  34. thanks for the fast reply Kurt! i dont have a...

    thanks for the fast reply Kurt!
    i dont have a clue what the SPIClass *theSPI = &SPI means and the implementation
    Adafruit_MAX31855::Adafruit_MAX31855(int8_t _cs, SPIClass *theSPI)
    : spi_dev(_cs,...
  35. i also added into the void Setup the: ...

    i also added into the void Setup the:


    SPI.begin();
    SPI1.setSCK(27);
    SPI1.setMISO(39);
    SPI1.begin();
  36. difference between teensy3.6 and Teensy4.1 SPI configuration

    Hi group,

    good morning,

    I solved the part that the tft screen is working again. now to the real problem.

    i cant get the code working on a teensy4.1, it worked before on a teensy3.6, its...
  37. Replies
    2
    Views
    287

    Changes to SPI ?

    Hello, I re-did my circuit board. and it worked before together with a featherwing 3.5, but I am getting Zero readings from my 4 thermocouples. Max31855 type K,

    SPI1
    I used two seperate SPI...
  38. Replies
    2
    Views
    427

    I tried that but the SPI devices stopped working....

    I tried that but the SPI devices stopped working. Iíll try tomrrow again

    Thanx

    For the reply!
  39. Replies
    2
    Views
    427

    SPI spi1 pins work around

    Hi


    I re arranged In my previous post the pins to SPI1 and the default SPI. For the max31855 and it works.
    I know you can set the SPI1.setSCK(27) to pin 27 but why isnít this pin used for SPI...
  40. Hi, I use 4.7 k resistors pull-ups on my CS pins...

    Hi, I use 4.7 k resistors pull-ups on my CS pins of the max31855.
    I used on the hx8357 featherwing 3.5 inch also a 4.7k on the CS to vcc. I had to remove that, because the scope images show not a...
  41. Sn74hc125 tristate required for between each SPI device? And how do you check this?

    Hi guys,

    I still havenít solved the problem yet, and have been googling the problem with the max31855 and other devices on the same SPI.

    All show similar problems with clearly Mosi problems and...
  42. I also tried the following to understand it...

    I also tried the following to understand it better so that I can see if it is run in consecutive order:
    by removing the Private function in the max31855 will allow me to talk to the...
  43. hi Kurt, i removed for the fun all of the code...

    hi Kurt,

    i removed for the fun all of the code referring to the TH1.begin();
    and I am not initializing anything.



    #include <SPI.h>
    #include "Adafruit_MAX31855.h"
    #include "HX8357_t3n.h"
  44. Thanks Kurt, I feel like a toddler. ...

    Thanks Kurt,

    I feel like a toddler.

    Suppose that is true, how would you explain if the part from the max31855 in setup is written above tft.begin(); because then the values Zero show up, and...
  45. Same as void loop principle with timing

    This means I have to repeat what I did at the void loop kind of the same....?
  46. commented out the initialiser for the max31855, your program works, display shows val

    Hi Kurt,

    first the things I tried:

    I updated the library for the MAX31855 the error is gone, still no data on the screen.
    I tried also using a other MAX31855 from Rob Tillaart the MAX31855_RT....
  47. Ok I’ll update the library. Just came across...

    Ok I’ll update the library. Just came across Adafruit tech forum.

    i clearly don’t understand the State machine.
    it has to be smaller then <=50;
  48. all the Warnings with the MAX31855 ...

    all the Warnings with the MAX31855




    C:\Users\Bpierik\Documents\Arduino\libraries\Adafruit_MAX31855_library/Adafruit_MAX31855.h:49:32: warning: passing NULL to non-pointer argument 1 of...
  49. clearly I really dont understand it. i have...

    clearly I really dont understand it.

    i have been trying this morning how to figure out the if and else statements
    i moved over to elapsedmillis to see how it its executed using Paull stofregens...
  50. Ok KISS== knights in satans service?:)... itís a...

    Ok KISS== knights in satans service?:)... itís a horrible work to help youngsters...:)I know;)
    I thought that counted only for the digitalWrite(CSpin,high);
    Especially with different SPI settings....
Results 1 to 50 of 179
Page 1 of 4 1 2 3 4