Search results

  1. R

    Teensy 4.0 CAN Communication with Raspberry Pi 4 CAN Hat (Wrong Messages)

    Actually, nevermind! Got it to work with the sample code using interrupts from https://github.com/tonton81/FlexCAN_T4/blob/master/examples/CAN2.0_example_FIFO_with_interrupts/CAN2.0_example_FIFO_with_interrupts.ino Very strange. Sorry for bothering everyone!
  2. R

    Teensy 4.0 CAN Communication with Raspberry Pi 4 CAN Hat (Wrong Messages)

    Hello! I am trying to establish CAN communication between my Teensy 4.0 with a Waveshare SN65HVD230 CAN Board (Amazon: https://www.amazon.com/SN65HVD230-CAN-Board-Communication-Development/dp/B00KM6XMXO) and a Raspberry Pi with a RS485 CAN Hat (Waveshare...
  3. R

    Multiple DC motor and encoders on a Teensy 4.1

    Hello forums! I am a student that is relatively new to electronics. I wanted to PID control six different DC motors with encoders using a Teensy 4.1. Each encoder is 2048 counts/rev, and the motor shaft will run at no more than 55 rpm. Based on the simple calculations, the number of counts per...
  4. R

    Teensy LC Code Not Working on External Power

    Thanks for the responses! Turns out that I need to attach a wire between the ground pins of the Teensy and the device connected to my computer. Didn't know you needed to do that...I've used UART in the past without attaching the ground pins of the two devices. Oh well. I'm glad it was a quick...
  5. R

    Teensy LC Code Not Working on External Power

    I'm sorry...I'm just going to keep rambling on this post about my debugging process in the hope that it might trigger an idea from someone. I luckily had a Teensy 3.2 on hand and tested the same code on it making sure the pin numbers are right. Same problem, and now it's on a breadboard, not my...
  6. R

    Teensy LC Code Not Working on External Power

    A bunch of questions I have but might not be relevant: Could something else be blocking reception via UART? Do I need to disable the other RX/TX pins for some reason? Do all the ground pins on the Teensy need to be connected to ground? What differences are there in connecting the USB vs not...
  7. R

    Teensy LC Code Not Working on External Power

    Thanks for the input! Unfortunately, I don't think this did anything. I now have void loop() like this: digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); digitalWrite(ledPin, HIGH); String reception = ""; // Serial.println("Booted up and waiting...
  8. R

    Teensy LC Code Not Working on External Power

    Update: I cut the trace between USB power and external power (as one might do to run Teensy off external power while having the USB plugged in). Still doesn't work. Seems that the Teensy has to be connected to my computer via the micro-USB to USB cord in order for the UART to not collect garbage...
  9. R

    Teensy LC Code Not Working on External Power

    Using some if-statements and LED blinks, the problem seems to be with the UART reading garbage when powered by 5V. It's not getting the right characters that are being sent from my computer. I checked by first plugging in the Teensy via the USB port and having my computer send characters to it...
  10. R

    Teensy LC Code Not Working on External Power

    Thanks for the quick reply! I didn't think I needed to run the blink example because I have the LED blink in my void loop() function. When I apply external power, the LED turns off for 1 second and then turns back on. Then, I send a command from my computer over UART to the Teensy, and the...
  11. R

    Teensy LC Code Not Working on External Power

    Hello! My project involves sending commands over UART from my computer to my Teensy LC, triggering the Teensy to send commands over I2C (using the Wire.h library) to an external device that can measure impedance. When I have my Teensy LC connected via USB, the code works just fine--I can...
Back
Top