Search results

  1. A

    TCP & UDP Server on Teensy 4.1

    Solution found, thank you all for your help!
  2. A

    TCP & UDP Server on Teensy 4.1

    That's exactly what I did and it works... but it also works and Millis. Now a new question, how to correctly add three variables separated by a comma ?
  3. A

    TCP & UDP Server on Teensy 4.1

    basic commands are transmitted via TCP, such as turn on, turn off, switch relays and other operations, only control data is transmitted over UDP, the data transmission period is 25 ms, so if several packets will be lost, it's not scary ..
  4. A

    TCP & UDP Server on Teensy 4.1

    i solved the problem! This example helped: #include "QNEthernet.h" #include <TimerOne.h> namespace qn = qindesign::network; qn::EthernetUDP udp(100); IPAddress ip{192, 168, 1, 254}; IPAddress mask{255, 255, 255, 0}; IPAddress gateway{192, 168, 1, 1}; IPAddress broadcast_ip; uint8_t buf[] =...
  5. A

    TCP & UDP Server on Teensy 4.1

    defragster, thank you for your answer and help! But unfortunately it is very difficult for me to understand (( could you just show me how to send this command ? udp.send(Ethernet.broadcastIP(), PortUDP, ???, ???);
  6. A

    TCP & UDP Server on Teensy 4.1

    Failed to make a transfer over UDP, please help! I need to transmit three comma-separated variables over UDP, adc1, adc2, adc3 Transmission frequency 25 ms In arduino I do this: udpServer.beginPacket(udpServer.remoteIP(), udpServer.remotePort()); udpServer.print(String(adc1) + "," + adc2 + "," +...
  7. A

    TCP & UDP Server on Teensy 4.1

    This is what I need! Now your code has completely satisfied me! Thank You very much! I'm starting to implement the code for sending messages over UDP.
  8. A

    TCP & UDP Server on Teensy 4.1

    defragster, I am very grateful to you for your clarifications and help! you are the right person! if I may ask one more question, how do I find out the number of accepted characters? for example, the word "Hello" has 5 characters, how to display the number 5 ?
  9. A

    TCP & UDP Server on Teensy 4.1

    I figured it out more or less, did it this way, I don't know how correctly, but it works as I need it! This is only TCP, I think it will be easier with UDP, in my device, reception is over TCP, transmission is over UDP, evaluate the code, point out the errors, and another question, can I make a...
  10. A

    TCP & UDP Server on Teensy 4.1

    I am very grateful to you for your help and links, I went to study, thank you!
  11. A

    TCP & UDP Server on Teensy 4.1

    Greetings, dear ones. Please tell a beginner how to adopt this code on Teensy 4.1 ? with Arduino NANO and W5500, it works very well, but there were not enough free pins, I've been fighting for two days, nothing works, please help! I looked at the QNEthernet library, but for me it is very...
  12. A

    Frequency Counter

    if (b2_enable && (millis() - b2_timer) >= 100) // delay time { b2_timer = millis(); b2_enable = false; digitalWrite (36, 1); // relay on FreqCount.end(); // here I need to turn off frequency measurement }
  13. A

    Frequency Counter

    I thank you for your answers! solved the problem mechanically, i.e. at the iron level, I turn off the signal from the generator with a mechanical relay, I could not solve this problem programmatically ...
  14. A

    Frequency Counter

    Hi, Paul. when using FreqCount. end(); I get the following error .. C:\Temp\arduino_build_411425\sketch\C5.ino.cpp.o: In function `loop': D:\Controller\C5/C5.ino:605: undefined reference to `FreqCountClass::end()' collect2.exe: error: ld returned 1 exit status
  15. A

    Frequency Counter

    Hello dear. I'm new to Teensy 4.1 programming, please tell me how to correctly in the LOOP function, in one place to turn on the frequency measurement, and in another to turn it off ? for example: if (condition 1) { FreqCount.begin(1000); // it works } if (condition 2) { FreqCount.end(); //...
  16. A

    TeensyTimerTool

    Hello dear. please tell the beginner again, how to implement such an algorithm ? Thanks in advance for your help ! Timer1 = 15 ms Timer2 = 25 ms if (Condition 1) { Timer1 ON Executable code 1 Timer1 OFF } if (Condition 2) { Timer2 ON Executable code 2 Timer2 OFF }
  17. A

    TeensyTimerTool

    thank you! I will try to do so, I have many other tasks in the code, I would not like to delay them ..
  18. A

    TeensyTimerTool

    greetings dear.. please tell a beginner, in 500 ms I need to make a request for Serial port, if I do so: Serial7.print("IF;"); Serial7.flush(); delay(500); then everything works correctly, but I don't want to use Delay() if I do this: if ((millis() - last_time) > 500) { Serial7.print("IF;")...
  19. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    ok, I understand you, I will try to figure it out. thank you again for your time!
  20. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    tonton81, maybe you will have a free minute, can you show me how to receive data from a block please? with not a lot of sample code?
  21. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    Yes fine! Thank you!
  22. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    Thank you for your reply! but for me it is difficult, I cannot do that, I lack knowledge :( I plan to send two commands sequentially, first online, then offline, probably this is not correct, but otherwise I have no idea how to do it :)
  23. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    yes, now thanks to you, I understood everything :) I am very grateful to you for your help! and if, can you tell me how to write the code correctly, for these purposes ? I will be your debtor!
  24. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    wow .... found a bug !!! I had it like that: msg.buf[0] = 0x01; msg.buf[1] = 0x01; did so: msg.buf[0] = 0x01; msg.buf[1] = 0x00; now the voltage switches very quickly, but another problem appeared, this voltage changes for 1 minute, then reverts to the previous value! now you need to...
  25. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    yes, this is the document I use, but it turns out that nothing works, I am sure that I am doing something wrong, but I can't understand what am I doing wrong? if the error is in the team, how should it be correct? maybe I'm not forming the team correctly ?
  26. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    Power Supply Huawei R4850
  27. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    tonton81, I am very grateful to you for participating in my problem! this is the data I accept using IFCTsimpleFIFOPolling.ino and wto such with the help IFCTsniffer.ino but I don't understand what they mean :(
  28. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    I've been fighting this for two weeks now, I broke my whole head, I can't imagine which way to dig ... I tried to connect through such a module, there is a delay .. there is clearly something wrong with the commands ...
  29. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    2.0-2.5 volts, these levels correspond to Teensy, I think it is possible that additional commands are needed for the block R4850...
  30. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    unfortunately I don't understand a lot, I have no experience with these devices, I use this wiring diagram ..
  31. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    tonton81, can I somehow disable data reception? I only need to transfer data, maybe then the transmission speed will increase? i made simple code, but the effect is the same, the delay when switching is 65 seconds :( #include <IFCT.h> CAN_message_t msg; void setup() {...
  32. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    unfortunately it gives nothing :(
  33. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    unfortunately there are no changes, the delay remains the same 60 seconds (((
  34. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    please tell me where to install this code ? msg.flags.extended = 1; I use Teensy 3.2, this code throws an error can1.setClock(CLK_60MHz);
  35. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    I am very grateful to you for your answer! but, I am very bad at programming ((( can't figure out what i need to do?
  36. A

    FlexCAN_T4 - FlexCAN for Teensy 4

    Hi, please, tell me, what am I doing wrong? when the temperature of the external device rises, the power supply R4850 must reduce the output voltage, the code works, but when switching the voltage there is a delay of 60-70 seconds, this is a lot! how to remove this delay? I will be very grateful...
  37. A

    Teensy 3.2 and Power Supply R4850

    Hi, dear. please tell a newbie how to switch between two voltages 44 and 55 volts in the R4850 unit, I am using a Teensy 3.2 controller board, it has a CAN bus, I really want to see the example code! you only need two positions from the switch, you don't need to output anything else. I will be...
Back
Top