Search results

  1. M

    TFT-espi with ST7796 gives white screen

    How do you access and use it ?
  2. M

    TFT-espi with ST7796 gives white screen

    Well, it looks like it was an SPI pin issue. When I went back to a bare board with std SPI pins it worked perfectly
  3. M

    TFT-espi with ST7796 gives white screen

    Mmm ..good point. I shall try std SPI pins.
  4. M

    TFT-espi with ST7796 gives white screen

    Sorry guys, didnt have the code on me to post at the time.. https://github.com/Bodmer/TFT_eSPI library source Here is a simple test I made up.... ******PLEASE NOTE that the MISO/MOSI pins are deliberately changed because I made a mistake on my PCB...grrrr #include <SPI.h> #include...
  5. M

    TFT-espi with ST7796 gives white screen

    Hi all I have been trying to get the TFT_espi library working with a 4" 320x480 tft. The screen works perfectly with Adafruit gfx & AdafruitST,7796s libraries but when I try even a basic demo example sketch with TFT_espi, but I just get a white screen. Have been thru User_setup.h lib, set...
  6. M

    Simulator for automotive and valve

    First up... What are you trying to simulate....? Then, I am guessing, you want to control something from the Teensy and what you want to control cant be controlled directly from the Teensy and will need some sort of driver module.....and for the Teensy inputs. Unless we know what you are...
  7. M

    Got my first Teensy 4.0s today.

    Code is the same, BUT Teensy 4.x have different dedicated pins or things like encoder and freq inputs.
  8. M

    Call to arms | Teensy + WiFi = true

    Teensy 4W 😁
  9. M

    Recommendation for LCD TFT screen

    No you dont This is exactly what you want, along with the Adafruit_GFX.h library For ST77xx displays, they are basically the same but have different definitions for screen size in pixels. You can basically set any screen size you need https://docs.arduino.cc/libraries/gfx-library-for-arduino/
  10. M

    Recommendation for LCD TFT screen

    4" x 4" could be hard to find. As long as it is an Arduino compatible driver chip like ILI9341 or ST7789 then you should be fine
  11. M

    Let's talk of possible new accessory boards

    Sparkfun Teensy Arduino shield adapter This with a level shifter would be ideal, especially if you have existing Arduino stuff
  12. M

    Let's talk of possible new accessory boards

    Teensy break-out board/shield to accept 5v inputs. It is so frustrating.
  13. M

    My Teensys keep dying!

    Yes. This will stop current loops and voltage differences. All Grounds and earth's should be joined
  14. M

    Quad Encoder interrupt detection

    I use QuadEncoder because it does not need interrupts as it runs on dedicated hardware pins,
  15. M

    T4.0 - Changing FreqMeasure.h pin

    FreqMeasureCapture.h /* FreqMeasure Library, for measuring relatively low frequencies * http://www.pjrc.com/teensy/td_libs_FreqMeasure.html * Copyright (c) 2011 PJRC.COM, LLC - Paul Stoffregen <paul@pjrc.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy...
  16. M

    T4.0 - Changing FreqMeasure.h pin

    I have been using FreqMeasure on Pin22 but I accidentally cooked the pin with 4v I then had a look at FreqMeasureMulti.h and noticed it basically did the same thing, so I tried it on Pin23, and it worked. Since pins 22 & 23 are the only ones free to use, is it possible to change the pin...
  17. M

    FreqMeasure with Teensy4.0 - strange results

    The reason I use FreqMeasure and QuadEnc is because they use hardware ( but only on specific pins ) Takes all the fun out of setting up ISR's etc. The hardware does all the work and lets the rest of the code do its thing. but you make a valid point. It would never work on an Arduino as they are...
  18. M

    FreqMeasure with Teensy4.0 - strange results

    This is my controller. I could have easily done a touch screen controller, but I like the tactile feel off buttons and knobs. I went 1000ppr because the stepper motor is closed loop with a 1000ppr encoder. It will be driving a 4mm leadscrew so this actually makes the control fairly easy. As the...
  19. M

    FreqMeasure with Teensy4.0 - strange results

    if (FreqMeasure.available()) { Of course......I knew it would be simple Yes, I really am using a 1000ppr encoder and the 1ppr resolution for RPM. Now for the reason. If you use 1000ppr ( say you use 'A' or 'B' ) the individual pulses or not the same time spacing for each position, so you end...
  20. M

    FreqMeasure with Teensy4.0 - strange results

    So I tried the serial output example and it worked fine, same hardware and connection /* FreqMeasure - Example with serial output * http://www.pjrc.com/teensy/td_libs_FreqMeasure.html * * This example code is in the public domain. */ #include <FreqMeasure.h> void setup() {...
  21. M

    FreqMeasure with Teensy4.0 - strange results

    Hi All I am trying to get an RPM tachometer working for my lathe using FreqMeasure.h the RPM range will be 1RPM-2000RPM The encoder is a generic Chinese ( OMRON style ) 1000ppr with A,B & Z. The Z outputs 1 pulse per Rev with 5v output The enc output on pin Z is high until the index mark is...
  22. M

    RPM from rotary encoder also used for stepper control

    Problem solved. I used FreqMeasure on pin 22 and QuadEnc on pins 31 & 33 and just shared pin 22 and 31 from the Quad encoder. works flawless up to 2000rpm and now I get enc posn and RPM and as they use the hardware encoders it lets the program do to what it needs to do
  23. M

    RPM from rotary encoder also used for stepper control

    1000PPR and max RPM would be 2,000RPM at most Quad Enc 1000PPR was selected as it ties in with leadscrew closed- loop stepper encoder
  24. M

    RPM from rotary encoder also used for stepper control

    I did find Quadencoder, but it was after I had the PCB made, so it is going to make it very hard to use. grrrr Direction is not a factor for the RPM, but essential for the leadscrew sync I am not using the SPI bus at this stage so I might be able to steal one of those pins. I do have an SPI...
  25. M

    RPM from rotary encoder also used for stepper control

    I am wanting to get an RPM value from a quadrature encoder that is used to control a stepper motor driving a lead screw on my lathe Full project https://github.com/MorryStu/Lathe-controller Unfortunately I am tight for spare pins on the Teensy4 so I would like to be able to derive the RPM and...
  26. M

    Mode change buttons with enum

    Hi Mark Thank you for that. I do use indentation, but for some reason, when I pasted it it did its own thing. I added your changes to readButton() it it worked as intended, as you original thought. The switch,case,break etc was me just trying to see what would work and how it (didnt) work I...
  27. M

    Mode change buttons with enum

    Well so far it is almost doing what I want. Currently it does not change mode when the respective button is pressed, just stays in "mm" mode and I am not sure why. The button light does display when the respective button is pressed, but no mode change and the button will stay on when a new mode...
  28. M

    Mode change buttons with enum

    ERROR CODE In file included from /home/stu/Arduino/Lathe_controler/Lathe_controler.ino:23: /home/stu/Arduino/libraries/Rotary_Encoder_KY-040_Fixed-main/RotaryEncoder.h: In constructor 'RotaryEncoder::RotaryEncoder(CallbackFunc, byte, byte, byte)'...
  29. M

    Mode change buttons with enum

    Hi All I am working on a lathe controller project. What I need is for 3 buttons to be able to switch into 3 different modes 1 MM - Metric Thread pitch in mm 2 TPI - Imperial thread pitch in Teeth Per Inch 3 FEED - feed rate for cutting I have momentary push switches switches with LED'...
  30. M

    Tank sensor

    You did not reverse R1 & R2. Make the tank sensor R1 and R2 the resistor to GND. 20 Ohms is the correct value for this setup and 600 is the correct value for the other setup. The results will be inverted when you compare them, Setup 2 would use less current. This has nothing to do with the...
  31. M

    Tank sensor

    OK. One pin is connected to 10v supply and the other pin goes to an analog pin. You then need a 20hm resister from the same pin to GND ( as this forms the other half of the voltage divider cct ). This gives a voltage from .2v - 3.3v. Then its an easy matter of mapping the analog read value to...
  32. M

    Tank sensor

    Yes, makes it a bit hard. There are 2 configurations that would work Going on what I know learned with a sensor like this is that it is basically a 2 pin variable resistor. If the resistor is fed by 10v, then ( hopefully ) you are looking at a voltage divider setup. One pin is connected to...
  33. M

    Using 2 x i2c display's with same address using SDA1/SCL1

    Thanks, that worked with Wire.begin() #include <Wire.h> #include <WireIMXRT.h> #include <WireKinetis.h> #include <SPI.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> //extern TwoWire Wire1; #define Wire Wire //#define WIRE Wire #define I2C_A_SDA 18 // I2c pins for display 1 on 12c...
  34. M

    Using 2 x i2c display's with same address using SDA1/SCL1

    Hi Guys I am trying to get 2 x OLED displays to work on separate 12c bus's using the standard SDA0/SCL0 (18,19) and SDA1/SDA2 (16,17) pins When I compile I get an error Compilation error: no matching function for call to 'TwoWire::begin(int, int)'...
Back
Top