Search results

  1. J

    Teensy 4.1 RTC get milliseconds correctly

    But This was too implement only the miliseconds, my goal is to print into my file (in the SD card) the full timestamp: year,day,hour,minutes,seconds and miliseconds. I can't understand why my work doesn't work when I try to implement my getTimsestamp() function. If I try the data logging without...
  2. J

    Teensy 4.1 RTC get milliseconds correctly

    Hi I am trying to implement a data logging system with a timestamp. I am already saving successfuly the data in our SD card and I am using a teensy 4.1 microcontroller. But, when I tried to implement the timestamp, nothing worked. Can you help me? This is my code: In the code, LogEntry is a...
  3. J

    Sample program to read and write data using the builtin sd card reader of Teensy 4.1

    void Logging::write_to_file() { if(writeTIMER > 100){ myFile = SD.open("example.txt", FILE_WRITE); myFile.println("Hello World!"); myFile.close(); /* if (!csv.open("data.csv", O_RDWR | O_CREAT)) { Serial.println("Failed...
  4. J

    Sample program to read and write data using the builtin sd card reader of Teensy 4.1

    #ifndef LOGGING_H #define LOGGING_H /* Esta classe vai ter uma ou mais funções que se vão responsabilizar em escrever os dados num ficheiro pedidos por VD (Lemos): BMS: int soc -> state of charge; int current -> current; int packVoltage -> pack voltage; BAMOCAR: int Nact ->...
  5. J

    Can you write unit tests for Arduino stuff?

    Hi I am a student that is currently in formula student. I am developing software in our car. We are using teensys 4.1. My problem is that in our last competition one judge said that we didn't have any plans to test our software and everything. Since I am studying computer science I have already...
  6. J

    FlexCAN_T4 - FlexCAN for Teensy 4

    Problems sending a message Hi I am programming my teensy 4.1 in order to send messages to my motor. The goal is to change the motor's speed but nothing is happenning. I attached the CAN manual. Basically, I am reading a value from a pontentiometer and converting to the proportion of my motor...
  7. J

    FlexCAN_T4 - FlexCAN for Teensy 4

    I am trying to do a multi-thread with 4.1 teenys. Is this possible with this teensy? This is my code: #include <Arduino.h> #include <FlexCAN_T4.h> FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> can1; int state = 0; int buzzerPin = 15; int frequency = 1000; bool first = false; int N_SAMPLES = 10...
  8. J

    How to compile ArduinoISP in platform.io

    I want to test a buzzer and I want to connect it to my teensy 4.1. How can I connect this to my teensy? This is my buzzer:https://pt.mouser.com/ProductDetail/DB-Unlimited/IP432912-3?qs=t9M3m0YJX4MrVfKSso20cw%3D%3D If you can help me, thanks a lot!
  9. J

    FlexCAN_T4 - FlexCAN for Teensy 4

    Hi I am using the FlexCAN_T4 library and I wanted to know a specific thing about this one. I wanted to know how can I translate CAN messages for integer/floats variables?
  10. J

    FlexCAN_T4 - FlexCAN for Teensy 4

    AAAA Thank you! Didn't notice that, thanks a lot!
  11. J

    FlexCAN_T4 - FlexCAN for Teensy 4

    Having troubel sending messages Hi I am programming a micrcontroller to send messages to a chager, this is because I am currently in a formula student team and the charger will be used to charge the batteries. The problem is that I am sending the through the micro but they are not being sent...
  12. J

    FlexCAN_T4 - FlexCAN for Teensy 4

    Getting confused with this library Hi, I am programming two teensys 4.1 and I am using this library. While I was programming, I was trying to check if there are any CAN messages available in my loop() like this: void loop() { // Check if there are any CAN messages available if...
  13. J

    How to use CAN bus on Teensy 4.1, 4.0 and 3.2 ?

    CANbus teensy4.1 Hi, I am communicating between two teensy 4.1 and I wanted to know if is there any way to test the communication without the can transceiver. I already saw one to buy but they take a lot of time to be delivered.
Back
Top