Search results

  1. S

    Bug in Teensyduino 1.58 for analogInputToDigitalPin()

    And with that response, I'm done.
  2. S

    Bug in Teensyduino 1.58 for analogInputToDigitalPin()

    I've just glanced at this, so take this reaction with a grain of salt, but: what happens with analogInputToDigitalPin(A0) ? A0 is 14. The return value should be 14. And with the original macro, it would be 14. But with the updated one, it seems -1 would be returned.
  3. S

    Beware! T4x RTC power consumption

    I'm gotten 23 and 17 months from the 2 I've used so far in my T4.0. I'll check the 3rd in another year.
  4. S

    Geany IDE meets arduino-cli

    Add "--no-color" to the end of your build commands and the quirk disappears. From one happy Geany/arduino-cli user to another!
  5. S

    Teensy 4.1 Error Message

    I don't see an error message, just a report on your program's memory usage, with lots of flash and RAM free.
  6. S

    Timer mystery

    I assume this is an IntervalTimer object? What happens if you move the "shutterTimer.end()" line to the start of testinner so that the shutterTimer doesn't get a chance to fire again while you're in the delayMicroseconds(test_u2) call in testinner?
  7. S

    Unable to install teensy_loader_cli on Raspberry Pi. Can't install libusb-dev

    I have an SD card for my 3B with stretch on it. I have the same version of libusb-dev installed on it (2:0.1.12-30) that bicycleguy mentioned. And I've built the teensy_loader_cli on it as well. libusb-dev depends on libusb-0.1.4 (=2:0.1.12-30) and one of libc6-dev or libc-dev.
  8. S

    Two Teensy 4.1 cannot communicate via NRF2401

    Including code as pictures rather than in [ code ]...[ /code ] blocks makes it harder for others to help you. From this code fragment: char text[] = "";, sizeof(text)); ask yourself 2 questions: 1. How many bytes are you asking the radio to read? 2. Assuming the...
  9. S

    Teensy 4.x RTC battery life

    It varies widely. Some days it's not turned on at all, some days it's on for less than 5 minutes, some days it might be on for a few hours. If I had to pick a percentage, I'd say it's off 90-95% of the time.
  10. S

    Teensy 4.x RTC battery life

    It's been a year now since I replaced the CR2032 in my Teensy4.0 setup with one from a well known Internet retailer of everything under the sun. After checking that the battery in the meter was still good by measuring the output from a regulated 5V bench supply, I checked the CR2032 and got...
  11. S

    Which os could I run on Teensy 4.1 that give me a CLI that can run simple sw?

    RunCPM runs nicely on a 4.1. A 100MHz+ Z80 running CP/M.
  12. S

    SD card on a 4.0

    Are both the screen and memory IC tri-stating whatever signal is connected to MISO when they're not selected?
  13. S

    SD card on a 4.0

    Correct. I've done that and it works great. Direct connection on all logic lines, but I used a separate 3.3V regulator to power the uSD card just in case. You could likely get away w/o the separate regulator but it was cheap insurance.
  14. S

    Teensy 4.x RTC battery life

    That earlier 2.95V reading may have been a poor connection on my part. Checked a couple of times over the past week and still reading a steady 3.00V here on the CR2032. Double checked the DVM against a known steady regulated supply (and swapped the DVM battery out just in case). After having a...
  15. S

    Teensy 4.x RTC battery life

    2.95V on the Basics CR2032 after 48 days.
  16. S

    I2C Teensy 4.1 using pins SDA1 and SCL1

    For SDA1 and SCL1, use Wire1 rather than Wire.
  17. S

    Teensy 4.x RTC battery life

    Yeah, I wondered about that... then I noticed that the voltage measurement was slowing drifting upwards. I turned on a regulated 5V bench supply and measured that and got 5.7V, drifting upwards. Hmm! Turns out it was long past time for the battery in the multimeter to be replaced! :o Changed...
  18. S

    Teensy 4.x RTC battery life

    I was impressed. :) I decided that it had done its duty and replaced it with a "Basics" battery from a certain well known Internet retailer. We'll see how it does. 3.5V to start.
  19. S

    Teensy 4.x RTC battery life

    I've had the same CR2032 hooked up to a Teensy 4.0 for 23 months now. I just popped the top off the case it's in to measure the voltage and it's only down to 2.73V. Not bad for a dollar store battery.
  20. S

    T4.1 software reset?

    Try this: void doReboot() { SCB_AIRCR = 0x05FA0004; }
  21. S

    memory, config storage, sd cards

    Ditto that. Putting a tiny bit of solder on kitty corner pads (and then taking most of it off with solder wick) seems to help me tack the chip down and then go to work on the remaining pins. Stone age, I know, but it works for me.
  22. S

    Teensy 4.0 RTC with battery doesn't save correct time after power loss

    On the T4, TimeLib is really handy for extracting values out of the timestamp that the RTC returns, and for formatting time strings, and lots of auxiliary stuff like that. But that's about all I use it for; the RTC's already keeping the time. No guarantee that this will actually run correctly...
  23. S

    Teensy 4.0 RTC with battery doesn't save correct time after power loss

    Your code never sets the RTC with a call to Teensy3Clock.set(time). Honestly, the only thing I ever use the stuff in TimeLib for is formatting the time I get from the RTC. Having library routines to keep time is fine for chips that don't have an always available accurate time, but just confuses...
  24. S

    Issue with returning zero length string from String.substring()

    At first glance, the culprit seems to be in String::move, which is the function that ends up being called by destination_string = source_string.substring(2,2);. In this case, the lhs has an available buffer, and it's capacity (3) is greater than or equal to the length (0) of the rhs, so the code...
  25. S

    Teensyduino 1.54 Beta #9

    As wwatson says, it's only cosmetic; the loader still works afterwards. But if you're looking at where to insert a redraw or two, here's some more data points: The picture disappears at the same time as the "Reboot OK" dialog box disappears. If the loader window is minimized and then...
  26. S

    Teensyduino 1.54 Beta #9

    I vaguely remember doing some GTK2 to GTK3 updating years ago, and running into a few "well, it mostly works" situations along the way. "Quirky" and "had to tweak" pretty much sums how I remember it.
  27. S

    Teensyduino 1.54 Beta #9

    A minor oddity with the TeensyLoader in beta9: after the upload completes, the picture disappears. Before loading After loading The loader continues to work fine. I don't see this behaviour with the 1.53 loader. This is on a Pi 3B running Raspbian Stretch.
  28. S

    Teensyduino 1.54 Beta #9

    No. If I wait 3 seconds after uploading, I get nothing at all. If I wait less than that, I get various lengths of the tail end depending on how long I wait. If I open the monitor right away after uploading, I get all 5 lines. Yes. Raspbian Stretch on a Pi 3B.
  29. S

    Teensyduino 1.54 Beta #9

    Ahh... figured out how to make the error message appear. I decided to take the error message at face value. It finds a folder in the libraries folder. So it expects to find at least a header file in there, right? If you want to include a library, you include its header file in your sketch. If...
  30. S

    Teensyduino 1.54 Beta #9

    Hmm. I tried this on Raspbian (Linux ARM) and couldn't reproduce it. If it was an IDE issue I'd have expected it to crop up here too. Modified the BlinkWithoutDelay sketch to print out millis when the LED went high; compiled and loaded fine. Added a tmp folder inside the libraries folder and...
  31. S

    Teensyduino 1.54 Beta #9

    Installed 1.8.15 and latest beta9 on a Raspberry Pi 3B. Teensyduino installer prompted me to copy 00-teensy.rules over to /etc/udev/rules.d/; I had an existing 49-teensy.rules there but I guess there's been some changes. In any case, everything installed and so far, no issues.
  32. S

    Has anyone seen the Teensy 4.1 ETHERNET_KIT available in Canada?

    I just ordered the PCB (the original version) from OshPark and picked up the bits and pieces from DigiKey. If you want one of the spare boards, PM me your mailing address and I'll pop it in the mail.
  33. S

    Is this a counterfeit Teensy 4.1

    That looks perfectly fine; the 4.1 cards didn't have the diagram on the back at the start. I've seen the card with the back image here on the forums but I don't know if they've made it into production yet? The 4.1 cards I have here aren't quite as glossy as the 4.0 cards, and are a couple of mil...
  34. S

    Teensy 4.1 RTC reset

    Well, when I'm using Geany as my IDE (which is pretty much all of the time), when it comes time to compile something for a T4.x, my compile command looks like this: board="teensy40";/usr/share/arduino/arduino --verify --board teensy:avr:$board:usb=serial,speed=600,opt=o1std,keys=en-us --port...
  35. S

    Teensy 4.1 RTC reset

    Why not just use the IDE to compile the sketch, then use the command line loader to load the hex file it creates?
  36. S

    Teensy 4.1 RTC reset

    The Teensy Loader program sets the RTC to the current local time every time it uploads a sketch. I don't know of any way to disable this. You could use the command line loader; it doesn't set the time.
  37. S

    "Error opening USB device: No error" while programming by teensy_loader_cli

    There is a problem with the blink_slow_Teensy40.hex file and the soft reset option. It'll load once, but after that it does as you describe. If you compile your own blink sketch, it'll work.
  38. S

    Program Teensy 4 from command line without pushing the button

    It was the hex file itself, not a 4.0/4.1 incompatibility? Interesting. The soft reboot code is only implemented in the Linux portion of the code. There's just a stub for OSX and Windows.
  39. S

    Program Teensy 4 from command line without pushing the button

    I can duplicate the problem on Raspbian if I load "blink_slow_Teensy40.hex" into a Teensy4.1 and then try and load it again. me@raspberrypi:~/Documents/src/teensy_loader_cli $ ./teensy_loader_cli --mcu=TEENSY41 blink_slow_Teensy40.hex -v -s Teensy Loader, Command Line, Version 2.2 Read...
  40. S

    Program Teensy 4 from command line without pushing the button

    The broken pipe error was caused by a too short "SET_LINE_REQUEST_TYPE" message. The system was expecting 7 bytes (4 bytes for speed, 1 for stop bit, 1 for data bits, and another for parity) but the loader was only sending 1 byte. Grab the latest version from Github; it's fixed there.
  41. S

    Newbee question about Set time example TimeTeensy3

    Out of curiosity I soldered a crystal and end header to my T3.2, hooked up a 3V coin cell and loaded the stripped down and modified version of the TimeTeensy3 sketch shown below. I removed all the time sync stuff (which is not needed to test the RTC and only serves to confuse things). I also set...
  42. S

    SD Library - create file with attribute DIR_ATTR_ARCHIVE 0x20

    I made a fork of SdFat-beta last year and added in makeSystem(), makeHidden(), makeReadOnly() and makeArchive() methods, as well as code in the sync() method (which is called when the file is closed) to set any changed bits. You might be able to use it as inspiration.
  43. S

    Simple Countdown, but something is amiss.

    No, actually you didn't. I didn't say to change and run the program. I'm saying: if you set those variables to those values, what output would you expect to see from the program? Write that down and show us.
  44. S

    Simple Countdown, but something is amiss.

    I'm going to approach this from a slightly different direction. If you set: Int long Days = 0; Int long Hours = 0; Int long Min = 0; Int long Sec_add = 3; What exactly would you expect to see printed? Next, if you set: Int long Days = 0; Int long Hours = 0; Int long Min...
  45. S

    Simple Countdown, but something is amiss.

    If you didn't change Sec from being an unsigned long, the testif (Sec >= 0) will always be true.
  46. S

    Simple Countdown, but something is amiss.

    Sec is an unsigned long, so it will never be less than zero. When you set all your Days, Hours, Min, Sec_add variables to zero, Sec will start at zero, but when you decrement it, it will be a really big positive number. And are you not missing {} around the lines where you're setting your...
  47. S

    Serial baudrate change on the fly?

    If we're talking about the Teensy 4.x, from experience, you can get away with just doing another SerialX.begin(new_baud_rate). Unless you're also using hardware handshaking (RTS/CTS), in which case you need to follow it with a SerialX.clear() to make sure that RTS is asserted. If RTS happened...
  48. S

    Teensy 4.0 and (S)RTC

    When are you seeing your problem? When the sketch is first downloaded and run? Or when the T4 has been powered off and then powered back on again? If the former, that's how it's supposed to work; the Teensy Loader sets the SRTC once the sketch has been downloaded. Your sketch shouldn't end up...
  49. S

    TEENSY 4.1 where do I connect to use third SPI

    Thank you for adding the back side! Those little cards are so handy at times.
  50. S

    Teensy 4.0 Detect USB presence?

    Something like if (Serial) { Serial.print(...); } should do the trick, I think.