Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: laptophead

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Thanks a lot Kurt, That worked

    Thanks a lot Kurt,

    That worked
  2. How to use various IC2 busses? Teensy 4.1

    I am using an IMU and a Lidar on the same bus and they play nice for most of the time.
    But sometimes the Lidar is showing zero for the readings.... The problem is so intermittent is hard to...
  3. Pete, I moved it to Com 8 and I get the same......

    Pete,
    I moved it to Com 8 and I get the same...
    I appreciate your help, but I decided to move to another IMU the Adafruit_BNO055. Works great, and there is support.

    Thanks again
  4. Tried all the way to the 112500, still getting...

    Tried all the way to the 112500, still getting garbage

    There is some software from the manufacturer that I can set up the Baud.
    Got to go now, travel on business. Will mess with it on fri
    ...
  5. Pete, thats a smart way to see whats coming, ...

    Pete, thats a smart way to see whats coming,

    Im out of my knowledge by now,
    Tried it and I get

    �Waiting for Serial1 response ... �ɼ������0�@�LM��i� �!��um ������|������9�|����Waiting for...
  6. Good observation, I moved the power to the 3.3...

    Good observation, I moved the power to the 3.3 and now the signal is at 3.3V

    Still no reading,
    I wonder if I formulated the read from Ser 1 correctly...

    #include <JY901.h>
    /*
    Test on Uno R3....
  7. Tried your recommended

    Thanks a lot, Pete
    I installed your library, but unfortunately I don't have a Ardu UNO

    So I tried to make it work on Serial1 on my teensy 4.1


    #include <JY901.h>
    /*
    Test on Uno R3.
    JY901 ...
  8. Said and done, I did replace it only in the .h...

    Said and done,
    I did replace it only in the .h file , could not find it in the .cpp. (BAUD does not appear)

    It did compile, and I uploaded.

    However it returns no data. So the IMU does not...
  9. First time install of the http://wit-motion.com IMU on Teensy 4.1

    This IMU is serial interfaced, and does a lot of calculations and corrections internally, so I was attracted to it.

    The manufacturer provides a small library that compiles fine for Ardu mega, but...
  10. Great observations Kurt, I moved the mode of...

    Great observations Kurt,

    I moved the mode of the lidar to IC2, no more interference,

    running at 400KHZ

    For the teensy community , here is the library
    ...
  11. I integrated the Lidar read in my robot general...

    I integrated the Lidar read in my robot general sketch and each reading is blocking it horribly.
    Whether I read at 10 hz or 100, all my processes stop at each read.
    The library author says
    "The...
  12. Great that worked, So for everyone else in...

    Great that worked,

    So for everyone else in the teensy family this should go like


    #include <TFMPlus.h> // Include TFMini Plus Library v1.4.1
    TFMPlus tfmP; // Create a TFMini Plus...
  13. Is #include "printf.h" compatible with T 3.5?

    I got this lidar, TF Mini Plus and found a library for it.

    https://github.com/budryerson/TFMini-Plus


    I have been using Serial.printf for a long time and it required no library, but this...
  14. Using the MPU9250 with a complex sketch running 8 motors via UART. Compatibility

    I developed this huge sketch for running a walking robot. 8 motors interfaced by 4 Serial ports.
    Everything refreshes at 10 mS. Reading encoders, sending commands.

    The time came to ad an IMU,...
  15. Where is Teensy Loader on my Mac? OS X 10.12

    I start using the new Teensy 4.1 and I downloaded the Teensyduino.
    Since then I have only problems with the USB connections. Serial monitor drops out, and I get upload errors every other time....
  16. When it glitches I get: ...

    When it glitches I get:

    java.lang.reflect.InvocationTargetException
    at java.awt.EventQueue.invokeAndWait(EventQueue.java:1349)
    at java.awt.EventQueue.invokeAndWait(EventQueue.java:1324)
    at...
  17. Trying to organize 4 serial commands in 10 mS with machine State, but....

    Overview
    I run a robot with 8 motors connected to UARTs and RS485 convertors.
    I devoted 4 serial channels, 2 motors each.

    When I send a serial command, I need to wait about 2-3ms for the...
  18. Trouble with the uploads

    Every third time I upload, I get:

    An error occurred while uploading the sketch

    No other explanations, but the sketch is loading, and teensy reboots.

    I would ignore it, but My serial monitor...
  19. More trouble with the 4.1

    Every third time I upload, I get:

    An error occurred while uploading the sketch

    No other explanations, but the sketch is loading, and teensy reboots.

    I would ignore it, but My serial monitor...
  20. OK I will run it at 600 MHz, I got the power. I...

    OK
    I will run it at 600 MHz, I got the power. I never seen an Arduino compatible take that much,

    I thought it was bad, shorted inside...

    Thanks a lot.
  21. Upgrading from the 3.6 to 4.1 Power issues

    When I power the 4.1 from USB it is drawing 6 mA, thats reasonable.

    Then I put it in the socket I build, where the 3.6 was, I apply 5 v at Vin and Gnd and :
    It takes 106mA. I disconnected it...
  22. Trying to get rid of Delay in a for loop. Weird consequences :

    Better start with the code:


    static unsigned long _ETimer;
    unsigned long Period;
    #include "Keyboard.h"
    int StepNo;
    static unsigned int i;

    String Kbd_Str; // from keyboard string via...
  23. Actually I discovered that I can use float arrays...

    Actually I discovered that I can use float arrays as function arguments

    Problem solved, forget structs

    Thanks for your help.

    Mitch
  24. Ok I tried this typedef struct Way_Pt { ...

    Ok I tried this



    typedef struct Way_Pt {

    float M1;
    float M2;
    float M3;
    float M11;
  25. Trying to use a struct to simplify a function, please help

    Pardon my inexperience...

    I got this robot consisting of 8 motors and I am able to send commands to each of them by this function:


    void Ev_GoTo_Pos (float M1, float M2, float M3, float...
  26. Thanks a lot , that worked

    Thanks a lot , that worked
  27. How do I software reset the Teensy 3.6?

    I found the commands that supposedly work on the 4.0 but they do nothing for the 3.6.

    I am triggering the reset by a serial command



    if (Serial5.available()) { // Read intstructions from...
  28. I got the library from Sparkfun to work and give...

    I got the library from Sparkfun to work and give me the Yaw, Pitch, Roll:

    If you need it here it is, nice and stable .


    /* MPU9250 Basic Example Code
    by: Kris Winer
    date: April 1, 2014
    ...
  29. Sebastian Thanks a lot, I will explore the...

    Sebastian

    Thanks a lot, I will explore the IntervalTimer.h

    Here
  30. My longest string looks like this 94 lenght...

    My longest string looks like this
    94 lenght
    M.Curr: M1:1.6A 0.7A 0.5A 0.0A B: M11:1.8A 0.2A 0.2A 0.0A, Volts:15.8A 4.9A Total,

    so you're right Sebastian, it is longer than 40.

    So I...
  31. never mind , I figured it. Silly me. I had a...

    never mind , I figured it. Silly me. I had a long day, sorry.

    for everyone:

    Serial5.printf( "%s Step: %d Compl A: %d Compl B: %d Send Once:%d First: %c Show Gaps:%d \n",
    ...
  32. Dear defragster The ISR is rarely used, it is...

    Dear defragster

    The ISR is rarely used, it is a switch that I flip sometimes. The blocking happens regardless...

    Kurt

    I tried Serial5.printf but it won't print out on ser 5 . it works for...
  33. It seems that sprinf is a blocking function? what to do?

    I am building a robot with 8 motors and I am sending to a PC where I have a GUI all kind of data. 112500 baud,

    8 encoders, 8 current readings and some other variables. I was counting on my 3.6 to...
  34. Maybe is easier to just use the MPU6150? It...

    Maybe is easier to just use the MPU6150? It seems that it provides my angles without all the trouble.

    right now I am using the https://github.com/bolderflight/MPU9250. library

    Is there a...
  35. How do I get the angle out of the MPU9250?

    I installed it and connected it to the IC2 and all seems fine.

    I tought the IMU.getGyroX_rads() will give me the angle, (inclination) of the IMU, but instead I get angular acceleration,

    I moved...
  36. Actually that was it. The pulses vary based on...

    Actually that was it. The pulses vary based on single turn or multi turn...

    For multi turn, this is the correct formula, in case others need it

    long Enc_2 = Enc_Read_2;
    Mot_Ang_Read...
  37. The Bitshift

    I am reading this fancy encoder sending me a Hex string, see attach link from the manufacturer.
    http://dow.gyems.cn/RMD-servo%20motor%20control%20protocol%20(RS485%29%20V1.6.pdf

    I am trying to...
  38. Thanks a lot, I will try

    Thanks a lot, I will try
  39. Is "split" a valid command for a string?

    I does show in red in the IDE , so it does exists, but I get a
    'class String' has no member named 'split'

    Long story short, I am trying to extract values (Floats) from a string based on the...
  40. A[11]), was the mistake, thanks every one. ...

    A[11]), was the mistake, thanks every one.

    Embarrassingly simple, sorry for the trouble.

    Paul:
    For the future I will post more definitions and code. In this case the data comes from a motor...
  41. sprintf is not running correctly on my 3.6, Thanks.

    Greetings community,

    I just learned to use sprintf and what a blessing, I am saving on tone of code.

    Here is a function I am trying to simplify, lots of data, I included the "old way" and the...
  42. Paul, I figured it , thanks for your help. ...

    Paul,

    I figured it , thanks for your help.


    if (Serial1.available()) {

    uint8_t b = Serial1.read(); // always read the next incoming byte
    if (b == 0x3E) {
    num_received =...
  43. Paul Thanks so much, your advice makes a lot of...

    Paul
    Thanks so much, your advice makes a lot of sense.

    I implemented your code and I am doing a printout. I used a flipping bool in order to print just once


    if (Serial1.available()) {
    ...
  44. VJ I implemented the uint16_t...

    VJ
    I implemented the
    uint16_t data_checksum_temp = 0;

    But still no reading from the last if,
    By the way, I am running at (115200). Is that relevant?

    We still have a bug?
  45. VJ Thanks a lot, so elaborate... So I tried...

    VJ
    Thanks a lot, so elaborate...

    So I tried to put it to work:


    while (Serial1.available()){
    uint8_t head = Serial1.read(); //Read one byte
    uint8_t command;
    uint8_t id;
  46. Still, How do I solve my problem? How to I...

    Still, How do I solve my problem?
    How to I receive transmissions of various lengths?

    I tried just receiving the first 7 bytes. Worked fine for the first transmission , then the second...
  47. Pete, I have a lot more than seven bytes in my...

    Pete,

    I have a lot more than seven bytes in my example, so is the fourth byte accurate? I don't see how.

    So what to do?
    read the 4 bytes always, and then how do I read the remaining bytes?
  48. thanks everyone, Changing the while to if did...

    thanks everyone,

    Changing the while to if did not work.

    The motor data sheet is at
    http://dow.gyems.cn/RMD-servo%20motor%20control%20protocol%20(RS485%29%20V1.6.pdf

    Here is a sample...
  49. How to read bytes transmissions of various lengths ?

    Using Teensy 3.5 Serial1. Are all the Serial ports buffered? Is there an advantage in using 1,2.3 or another?

    I am talking to motor with a built in encoder. I am sending commands and the motor...
  50. Kurt Thanks a lot. About Serial4 writing out, I...

    Kurt
    Thanks a lot. About Serial4 writing out, I reduced the size of the string I am sending, and I think is not blocking anymore.
    I don't see the blockage on the scope like before.
    However, it...
Results 1 to 50 of 112
Page 1 of 3 1 2 3