Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Rongyos

Pages: 1 [2] 3
TCB Dev / Re: Ideas for the OP Config
« on: May 26, 2023, 02:12:06 PM »
I think I will need to buy an Arduino and LED to do some testing at home.

You dont need to if I am here :)
Very, very close. I think we can meet the goal if the max flickering dim is below the max dim (255)

Something like this:

Code: [Select]
  // Here we vary the light between some lower and higher dim levels, it can go full off or full on, but also something in-between
                if (flickerState) analogWrite(pin_Brakelights, random(100));      // Dimmer   - random value between 0 (off) and 100 (not even half brightness)
                else              analogWrite(pin_Brakelights, [u]random(45)[/u]+180);   // Brighter - random value between 180 and 255 (full on)

I dont understand the first row. Why do we need 0 (full off) state?

Here is the video. IRL its mutch better and looks like drop voltage flickering but It will be better with lower max value :)


TCB Dev / Re: Ideas for the OP Config
« on: May 25, 2023, 02:20:22 PM »
let's see if the effect looks good on the brake output first, because it will be the same effect on the Aux output.

Hi Luke,

Thanks for your support :) I think "we are almost there". The flickering works in the brake light but I think it only needs a "faderate", because now it changes the dim very fast.
IDK if this helps but I found a code from somewhere with fadein fadeout (it might be useless but trying to "help"):

Code: [Select]
  int brightness = random(256);

  // Fade in
  for (int fadeValue = 0; fadeValue <= brightness; fadeValue += 5) {
    analogWrite(ledPin, fadeValue);

  // Fade out
  for (int fadeValue = brightness; fadeValue >= 0; fadeValue -= 5) {
    analogWrite(ledPin, fadeValue);


Hi Everybody!

Can you recommend a cheap RFI/EMI filter for my homebuilt sound card? In lower volumes I hear annoying buzz or high pitch noise and if I put my tx closer to the device a buzz going crazy. Maybe I need shielded cable for the speaker? Can I make it better with shielded cable?


TCB Dev / Re: Ideas for the OP Config
« on: May 24, 2023, 02:14:34 PM »

The brake light is connected to an analog output which is how we are able to dim it for "running lights." If you set the "Brake Lights on When Stopped" option you will see that it uses a flickering effect similar to the candle effect you found. But when we are flickering the "running lights" I can't be sure what dim level the user specified, and to flicker a dim light it might not be very visible, so in that case I am flickering it only between off and the dim level.

In the meantime, maybe you could attach a white led to the Brake lights, and select the "Brake Lights on When Stopped" option, and then at least let me know if that effect even looks very good?

Hi Luke,

I attach a video how it looks. The brake light is on during enginestart sequence and no flickering on it (in the video it looks like it has but its just visual illusion, the blinking headlight effects the camera lens (beleive me pls :) )

Is the Headlight pin is PWM compatible digital pin? (analogWrite = random(150)+170)

How complicated will be to add this effect to AUX outputs if the brake light flickering will successful? It would be very good.


TCB Dev / Re: Ideas for the OP Config
« on: May 22, 2023, 04:14:46 PM »
Let me know how it goes.

Hi Luke,

I thank you that you are dealing with it :)

Now the functions are working fine but a flickering does the led switch on and off randomly. Maybe thats why I wrote you a whole bunch of stupidity in the code.

What about if you can change this? (stolen from candle effect arduino code):
Code: [Select]
// Generate a random dimming value (0-255)
 int dimValue = [i]random(170) + 170[/i]

Rongyos (the guineaPIG) :)

TCB Dev / Re: Ideas for the OP Config
« on: May 22, 2023, 08:19:17 AM »
I don't actually have a TCB to do any tests with, so I can't say exactly how good it will look. I'd appreciate if you could test it both to make sure it works as intended and also to let me know what you think of the flickering.

Hi Luke,

First of all, thank you for your quick reply and support.
I downloaded the new firmware and OP Config, managed to set up the build. I faced some bug / error:
  • Light toggle on/off function not working properly on headlights (see video) - its working well with toggle on + toggle off functions binded on 2 pos switch
  • Start engine flickering not working with toggle on/off function at all
  • Start engine flickering has some errors:
    • a. only works with 2 pos function
    • b. no lights at all during the start engine sequence
    • c. random light sound played during the start engine sequence

maybe there are more dependencies than I thought :( I attached a video for better understanding.

The build is up and I am happy to test the upgrades :)


TCB Dev / Re: Ideas for the OP Config
« on: May 19, 2023, 02:22:39 AM »
Hi Luke,

First of all, please don't laugh at me because my programming skills are very basic

I have a Beier board and I very like the headlight flickering effect on it but it has some flaws. I generated a basic flickering function which can be (I think) put in LIGHTS.ino

Code: [Select]
// Duration of the flickering effect in milliseconds
const unsigned long flickerDuration = 5000; //no idea where to put this - that should be cool if the user can set this in the OPCONFIG

void EstartFlickering {
  // Check if the flicker duration has elapsed
  if (millis() >= flickerDuration) {
    // Turn off the LED and exit the loop
    digitalWrite(ledPin, LOW);

  // Generate a random dimming value (0-255)
  int dimValue = random(256);

This function can be put in DRIVING.ino where engine starts (at there there is also a
Code: [Select]
// Play the engine start sound

there. The duration time should be set by user (easiest way). The beier reads the sound wave signals and flicker the LEDs following the wave spikes which is not realistic when the tank engine finally on and has a revving sound in the "enginestart" sound. In that phase the alternator can put voltage IRL and the headlights are even, but beier lower the dim according to the sound volume, thats what I dont like. The duration should be the time while the tank starting up, ignition or how can I say that in English, hope its understandable :) .
Can you somehow put this function in the codes? (I think mine wont work if i put it with force :) )

Hi Luke!

I made a soundset for KV-1 (only engine). How can I share with the community?


What software are you running on your TX16? If it is OpenTx, here is a video on how to set the failsafe values. I don't know if that is your problem or not, but you could experiment with it anyway. You will want to set the failsafe position of Aux Channel 6 to position 1, so that if the connection between the receiver and transmitter is lost, or hasn't been established yet, the cannon will not fire.

 Hi Luke! I get connected to OpenTX developers for TX16S and tried several tips. I think the new firmware on radio is messed up something or makes a "preflight" test.

Anyway I managed to solve the problem with raising the offset of the cannon fire channel (it is a toggle switch) to the middle (like a middle position of a 3pos switch) and no cannon fire on startup but when I activate it it works fine.


Hi Rongyos, if I understand you correctly, the cannon fire happens when the TCB first starts. And this involves not only the sound, but also the recoil servo. If that is the case, then we can eliminate the sound card as being related to your problem, it is clear that the TCB is the one firing the cannon.

Yes, thats the case. Maybe posts related to this issue should be replaced somewhere else, sorry. I didnt put servo on the first try and only heard the cannon fire so I assumed that the sound card is failed somehow.

Plug your TCB in to your computer with a USB cable and connect to it with Snoop (on the Firmware tab of OP Config) to see what is happening. Does the TCB report a "Cannon Fire" event when it first starts?

snoop results attached (on the second try I put the cannon fire switch to channel 16 on radio and there is no cannon fire function triggered anymore) please search for #####First try  and #####Second try keywords

I wonder if maybe you have Aux Channel 6 in Position 2 when the TCB starts?

I see you have Aux Channel 6 set to "Reversed" in OP Config. Maybe un-reverse it in OP Config, and reverse it in your radio's settings. You can also try changing the cannon fire function to a different aux channel.

I can't say what the problem is, but I am confident it is not an error in the code. Somehow the TCB thinks that the cannon should be fired, which implies that your radio is telling it to. You will have to do some more troubleshooting yourself. Even if you don't solve the problem right away, hopefully you can discover a piece of information that will help us solve the problem.

Yes this might be my radio. I recently updated the firmware on this because with the old firmware I could not manage to bind new sbus receiver I use for another TCB. I tried several receivers (Original is  Flysky i8a i-bus, others Radiomaster R191 Sbus and Radiomaster R168 sbus) whit get the same results. Its not related to radio protocols, I think its some failsafe or precheck stuff in the radio but I cannot figure it out myself (disabled preflight and so on but nothing helps). Regarding reverse / not reverse channel I could set this and except this startup issue everything works fine.


EDIT: I reload the min/max values and stick centers, not helping


1. You have a sound file on your SD card that plays the cannon sound, but you gave it the file name for something else (in other words, something other than "cannonf.wav")
2. Or for some reason the TCB is sending the signal to fire the cannon at the same time it sends the signal to start the engine.

For #1, I would put the SD card into your computer and listen to all your sound files once again, just to verify that the cannon sound didn't somehow get named to something else.

For #2, examine all your function triggers in OP Config. Did you maybe link the "Cannon Fire" function to the "Engine Start" trigger by mistake? Did you maybe assign the "Cannon Fire" function to the same switch on your transmitter you are using to start the engine?

I checked all that options but did not see any suspicious user error (I also checked the radio switch reading on Opconfig everything works fine)

You can post your OPZ file if you want me to look at it.

Yes sir attached

There is something else I noticed in your video, which may or may not be related to your problem. I notice there is a delay of several seconds from the time you flip the switch on your transmitter, to the time when the engine starts. Do you know why that is?

Well I dont know what it is but realized I dont have to use the ignition switch teensy plays it anyway, its like a "startup" sound or IDK... Before that it doesnt play any sound.

By any chance do you have an engine "Preheat time" specified? (In OP Config on the Motors tab, under the Smoker section, when Type is set to "Separate Heat & Fan").
Dont have this LOV, maybe my OPConfig outdated? V.093.51 version installed. Please see the pic attached

On your SD card do you have a sound file called "preheat.wav"?
no sound file

EDITEDIT: no its not a soundfile. The tcb shoots after first startup (it uses the servo once and next action is cannon fire with sound and recoil)... :) strange.
EDIT2: similar with the latest OP app and latest TCB firmware

Hello LukeZ!

Finally I managed to try the sound card. I have a problem: on cold start (first start from tcb startup) there is an unecessary cannon fire before is starting ignition.
I have no cannon fire in the sound file. Soundfiles seems good and other sounds (warmstart too) are working fine.

Can you please help me out in this? I just refreshed the firmware on teensy.


Hi Tankers!

Very easy but confusing question. Connecting PCB and sound card serial should be like:

Am I right? I attached a picture but I connect it to the wrong connector just for reference.


Open Panzer Help / Re: Compatible teensy versions
« on: July 11, 2022, 06:25:59 AM »
Hi Rongyos, unfortunately although the Teensy 2.0 can do many things, it does not have the necessary processing power to handle the sound generation. So you will need to use the Teensy 3.2.

I know right now they are not available due to the supply chain mess. The semi-conductor shortage is a real problem, much bigger than I thought it would be when it first started. It does not appear at all close to being resolved. When major car manufacturers in America can no longer make automobiles, I don't know how long it will be before hobby things like the Teensy will be able to return.

Hi Luke!

Thanks for your fast reply. I try to not be annoying, but what about teensy 4.0? It is available at local stores.


edit: I found this comparison table. The 4.0 version has differenc processor, so I assume this is not compatible for the board but waiting for your confirmation.

Open Panzer Help / Compatible teensy versions
« on: July 09, 2022, 06:23:45 AM »
Hi fellow tankers.

My sound cards are under assembling and I have a teensy 2.0 at home. Will IT work perfectly or v3.2 is necessary?


Pages: 1 [2] 3