Search results

  1. shookti

    arduino-cli does not compile sketch for Teensy4.1

    The RPI being used is 64 bit, and the OS installed is the 32 bit version because there are certain programs that need it that way. Would this cause the problem? It's strange that Arduino IDE managed to compile the sketch after doing what I've described in post #1, where I uninstalled and...
  2. shookti

    arduino-cli does not compile sketch for Teensy4.1

    Looks like this is the case, will confirm
  3. shookti

    arduino-cli does not compile sketch for Teensy4.1

    @jmarsh This the output of uname -m: aarch64 @PaulStoffregen ldd: pi@raspberrypi:~ $ ldd .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ not a dynamic executable pi@raspberrypi:~ $ file: pi@raspberrypi:~ $ file...
  4. shookti

    arduino-cli does not compile sketch for Teensy4.1

    This is the output, looks like the file you refer to exists: pi@raspberrypi:~ $ ls .arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/ arm-none-eabi-addr2line arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-objdump arm-none-eabi-ar...
  5. shookti

    arduino-cli does not compile sketch for Teensy4.1

    @PaulStoffregen The original command and output are in verbose mode ('-v' at the end of the command). I have put the entire output of the command in post #1. I guess the screenshot below is 'proof' 🙃: There is stuff in there: pi@raspberrypi:~ $ ls...
  6. shookti

    arduino-cli does not compile sketch for Teensy4.1

    @PaulStoffregen I tried reinstalling the teensy board using arduino-cli like so (yes, the board url has been placed in ~/.arduino15/arduino-cli.yaml): I first ran: arduino-cli core uninstall teensy:avr Then: arduino-cli core install teensy:avr However, that did not work. The compilation...
  7. shookti

    arduino-cli does not compile sketch for Teensy4.1

    @h4yn0nnym0u5e Yes, the udev rules are in place, but I don't think it should matter as the command is only compiling the sketch, and I think udev rules would come into the picture during the upload process. I know for a fact that arduino-cli does not need the teensy loader to be running during...
  8. shookti

    arduino-cli does not compile sketch for Teensy4.1

    Thanks @shawn , updated the original post
  9. shookti

    arduino-cli does not compile sketch for Teensy4.1

    I am trying to upload a sketch to a Teensy 4.1 on a raspberry pi running raspbian bullseye using arduino-cli, however it throws an error: Command used: arduino-cli compile HardwareTest.ino --output-dir Build/ --fqbn teensy:avr:teensy41 -v Output: FQBN: teensy:avr:teensy41 Using board...
  10. shookti

    How to use teensy_loader_cli if there's more than one Teensy connected to my computer?

    Hi, I have two Teensy 4.1s connected to my computer, and the following command automatically chooses one to upload the .hex file to (I want to upload it to a different one): teensy_loader_cli -w </path/to/sketch.ino.hex> --mcu=TEENSY41 -sv How do I use teensy_loader_cli to upload to a specific...
  11. shookti

    Why is one of the time multiplexed analogReads of the same pin (reading noise) not centered around zero?

    I put this line in the setup function and the behaviour did change, but now it looks like this: Neither of the 2 types of reported values are centered around Zero now. Ran the code twice just to make sure, and both times it looks like this. This is how it looks if baseline subtraction is...
  12. shookti

    Why is one of the time multiplexed analogReads of the same pin (reading noise) not centered around zero?

    Here is all the code: PhotoOpto.ino: #include "config.hpp" IntervalTimer timer; volatile int timeCounter = 0; int totalTime = MEASURE + LED_ON + ISO_EXC_GAP + MEASURE + LED_ON + (TIME_PERIOD * 1000); // times at which isosbestic LED turns on and off, and analog data is acquired int...
  13. shookti

    Why is one of the time multiplexed analogReads of the same pin (reading noise) not centered around zero?

    Are you saying that after every analogRead, the pin should be reconfigured using pinMode? Since the pin is being used to read analog values from, wouldn't using pinMode set the pin to INPUT_PULLUP or INPUT_PULLDOWN which would render the pin unusable for analog input? I could not find the...
  14. shookti

    Why is one of the time multiplexed analogReads of the same pin (reading noise) not centered around zero?

    It does not #include anything else. It only contains variable definitions like the numbers that decide the LED modulation and measurement timing. Do you still need to see the code? I'm sorry, I did not understand this. What do you mean by "proximity to something (?) or (?)" I ran the code that...
  15. shookti

    Why is one of the time multiplexed analogReads of the same pin (reading noise) not centered around zero?

    I have a program that acquires time multiplexed analog data from a single pin (pin #27) on a Teensy 4.1. Each measurement is a single value that's reported using Serial.print averaged over ~500 microseconds, with some values being averaged by setting analogReadAveraging(32) and the remaining by...
  16. shookti

    micros() rollover period on Teensy 4.1

    How much time ellapses before the micros() built-in function rolls over on a Teensy 4.1, and how to increase this time?
  17. shookti

    Why isn't this interrupt printing 'paused'?

    I'm a bit of a noob when it comes to things like this.. I would appreciate it if you could clarify some things.... I notice that you've used the GPT timers as indicated by these lines: Why have you chosen these instead of using any of the other timers (PIT, TMR, RTC, software) you've listed...
  18. shookti

    Why isn't this interrupt printing 'paused'?

    Follow up question; if I do not require interrupts with priorities assigned (say if I have only one interrupt), are there any drawbacks / advantages to using TeensyTimerTool as opposed to good old IntervalTimer?
  19. shookti

    Why isn't this interrupt printing 'paused'?

    Just curious... if the Teensy 4.1 cannot set different priorities for multiple timer interrupts, how does it decide which one to run?
  20. shookti

    Pyserial script throwing OSError: [Errno 5] Input/output error while communicating with T41

    Is keeping track of a bunch of variables storing ints, let's say 5, that are defined at the beginning of the program and are reported periodically to the computer a good way to find memory leaks?
  21. shookti

    Pyserial script throwing OSError: [Errno 5] Input/output error while communicating with T41

    I have verified that the Teensy does not crash by using the try-except block that catches the OSError errno 5 and recreates the pyserial connection. I have seen that the data the Teensy is reporting after that are not random numbers but accurate results of some computations done by the Teensy...
  22. shookti

    Pyserial script throwing OSError: [Errno 5] Input/output error while communicating with T41

    I am maintaining a project that performs long term (weeks/months) communication with a Teensy 4.1 using Python3 and pyserial (version 3.5) that runs on both Ubuntu 22.04 and Raspbian Bullseye (basically various Linux distros). The pyserial Serial object is created using the...
  23. shookti

    Why isn't this interrupt printing 'paused'?

    I see, thank you for responding. Could you point me to some beginner friendly resources that explain how to use GPT timers?
  24. shookti

    Why isn't this interrupt printing 'paused'?

    volatile bool pauseInterruptPrints = false; IntervalTimer timer1; IntervalTimer timer2; void setup() { Serial.begin(500000); timer1.priority(50); timer2.priority(100); timer1.begin(spam, 1000000); timer2.begin(bacon, 2000000); } void loop() { } void spam() { if...
  25. shookti

    When should Serial.send_now() be used?

    I know that the function is supposed to send whatever is in the transmit buffer whether or not it has been filled, but when does one typically see things like this happening? Are there things that can go wrong if the transmit buffer remains partially filled for a while and Serial.send_now() is...
  26. shookti

    How is analogReadResolution() able to make the bit depth on the Teensy 4.1 higher?

    Thanks a lot for your explanation, it was very helpful. I am currently running the ADC at 12 bits acquiring data at 1 kHz in a noisy environment, and it seems to be working fine.
  27. shookti

    How is analogReadResolution() able to make the bit depth on the Teensy 4.1 higher?

    If the official specs on the website lists the resolution of the Teensy 4.1 as 10 bits, what is the purpose of losing out on the 2 remaining bits that are made use of when analogReadResolution(12) is called? Is the ADC significantly slower or worse somehow when sampling at this resolution?
  28. shookti

    Serial.readStringUntil('\n') reading different number of characters each time.

    Yes, you seem to be right #! /usr/bin/python3 import serial ser = serial.Serial(port="/dev/serial/by-id/usb-Teensyduino_USB_Serial_13124230-if00", baudrate=500000) data = "" while True: data += ser.read(ser.inWaiting()).decode("utf-8") if data == "" or not data.endswith("\n")...
  29. shookti

    Serial.readStringUntil('\n') reading different number of characters each time.

    I have figured out a fix for my problem, that addresses the symptoms of what might be some deeper underlying issues in a codebase that I maintain containing a few questionable design choices (i really doubt that these have caused this problem) made by other programmers (like heavily using...
  30. shookti

    Serial.readStringUntil('\n') reading different number of characters each time.

    It's not, as that part of the code runs before any data is sent to the Teensy, which happens only after the ID is sent. This part: // send char signalling script to send float and ID Serial.print("Y,"); Serial.println(id);
  31. shookti

    Serial.readStringUntil('\n') reading different number of characters each time.

    I have a program running on a Teensy 4.1 (connected to a Linux machine) that requires persistence of some floats between power cycles to resume where it left of the next time it's powered on. To achieve this, I had written some code that sends these numbers to a computer and saves them to a file...
Back
Top