Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • SteveSFX's Avatar
    06-09-2021, 08:31 PM
    This line throws up and error... error: expected initializer before 'LockAnimation'
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-09-2021, 08:08 PM
    Hi Still working on my DMX project, but I thought a fresh thread for this question would be correct My main loop runs, samples sensors, reads and write DMX commands. All going fine. However, I would now like...
    1 replies | 98 view(s)
  • SteveSFX's Avatar
    06-07-2021, 04:31 PM
    Thanks Shawn, I will investigate that further. I will eventually put this onto a proper PCB, so I will prototype a few options on a breadboard first and see how they perform
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    06-07-2021, 12:21 PM
    Shawn you are a legend. Thank you. I have amended my design. I have freed-up a hardware serial port (by using altSoftSerial for the Nextion screen). I now have Serial1 for DMX TX and Serial2 for DMX RX. I will...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    06-07-2021, 07:28 AM
    Binned them. More trouble than they were worth. Interesting learning curve, and did get them working to a degree, but they created more issues than they solved. I re-wrote the code more efficiently, and used a...
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-07-2021, 07:25 AM
    Shaun. Thank you for your time and attention on this. I sat down last night and re-evaluated the project. I realised that you are correct (you knew that!)... I should really be using two separate DMX circuits and...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    06-06-2021, 07:07 PM
    The switching is done with this circuit: (I mentioned it above)... http://www.mathertel.de/Arduino/DMXShield.aspx I have breadboarded this circuit. I have used this circuit before and it works well. I have...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    06-06-2021, 01:47 PM
    Hmm OK. If I write to my Nextion screen with a command in the main loop, occasionally it doesn't carry it out. This must be because the thread has been called and therefore the serial command to the screen never...
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-06-2021, 10:07 AM
    So, I declare a Mutex: Threads::Mutex LockAnimation; Then, in the subroutine, I call it first to 'protect' that sub routine? void Animation() { Threads::Scope scope(LockAnimation);
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-06-2021, 08:06 AM
    Thanks Shawn. It does appear to be working, but I am still tweaking about with it all and learning as I go. I'll explain the basic idea. 5x 16A 230v input sockets. These go through 5x 30A relays to 5x 230v...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    06-05-2021, 09:28 PM
    Hi I worked out what was causing the lock-up. I was jumping to the Thread routine from another line by accident. My interrupts are not in that thread See where we go from here!
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-05-2021, 01:20 PM
    OK. well the threads method is interesting, and did work.... to a degree. But I have found it also can lead to the processor totally locking up for reasons I don't understand and cannot work out. TOTALLY sure it's...
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-02-2021, 11:14 AM
    OK. Thanks for all the advice. I will tinker further I do get data from Serial1 in the main loop, and Serial3 in the thread. Not sure how to implement the Mutex thing. I will have to look into that. Thanks
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    06-01-2021, 09:36 PM
    Can anyone assist with pausing a thread? I have a thread that is collecting data each second, and it's working fine. Reading the library notes, I believe you can pause and resume the threads, but I cannot seem to...
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    05-29-2021, 08:16 PM
    Many thanks. I believe my current setup is probably not quite correct then (not at that laptop at the moment, so doing this from memory)... I think I may be trying to do this the way I did another project using...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    05-29-2021, 05:50 PM
    Yes. After further investigation, I think I may end up making the problem just as bad, but in a different way. I would imagine I will run into issues with the serial ports 1 and 3, as their use would probably overlap....
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    05-29-2021, 05:46 AM
    Hello all I have a program that runs in a loop, and issues DMX values as required, depending on the state of 5 buttons. Pretty simple. The DMX values are set up to either switch on and off immediately to preset...
    24 replies | 629 view(s)
  • SteveSFX's Avatar
    05-28-2021, 03:14 PM
    If I switch to transmit, send the data and then switch back to receive immediately (as follows), it's clearly going to not send the data as the direction status will change too quickly. What would be the best solution...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    05-27-2021, 07:28 PM
    Thanks. . Complicated! The DMXserial library for Arduino has pin 2 allocated to go high automatically when transmitting and return low after transmission. I wondered if the Teensy library did the same. I have...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    05-27-2021, 11:40 AM
    Thanks Shawn I have 'freed up' a second serial port in case I need it, but I am going to being using the project as primarily a receiver with the occasional command sent. Therefore I can leave it sitting in RX and...
    18 replies | 535 view(s)
  • SteveSFX's Avatar
    05-25-2021, 09:10 PM
    So: I have this at the start of my routine: #include <PZEM004Tv30.h> // Mains AC monitoring library PZEM004Tv30...
    4 replies | 228 view(s)
  • SteveSFX's Avatar
    05-25-2021, 07:59 PM
    Thank you Mark, I will have a go with that. It's similar to my attempts, but I have failed so far. Google did not come to the rescue. #define NUM_PZEM 5 PZEM *pzem_array = { &pzem1, &pzem2, &pzem3, &pzem4,...
    4 replies | 228 view(s)
  • SteveSFX's Avatar
    05-25-2021, 06:35 PM
    Hi all. I have this following sub-routine that checks for data from a PZEM mains voltage monitor. It all works fine. But, I have five of these modules on the serial bus and for the life of me, I cannot work out...
    4 replies | 228 view(s)
  • SteveSFX's Avatar
    05-25-2021, 04:49 PM
    Hello all I have been tinkering around with a Teensy 3.2 and the TeensyDMX library. Has anyone experience of this library? My question is regarding 2 way DMX communication. I am reading conflicting reports...
    18 replies | 535 view(s)
No More Results
About SteveSFX

Basic Information

Statistics


Total Posts
Total Posts
123
Posts Per Day
0.19
Last Post
Threads... possibly going to cause issues? 06-09-2021 08:31 PM
General Information
Last Activity
06-10-2021 09:01 AM
Join Date
09-16-2019