Date   
Re: Finding variables in source code

Jack, W8TEE
 

True, Ron, and that's were Grep shines over most editors, since they are usually limited to the current file. Grep not only searches all of the files in the current directory, it also search all of the subfolders of the current directory. Often that "deep search" is exactly what's needed.

Jack, W8TEE

On Monday, July 16, 2018, 6:52:27 PM EDT, W2CTX <w2ctx@...> wrote:


IDE "find" is really handy but it only searches the currently opened file.  The old

"grep" command can search many files.


ron

On July 16, 2018 at 5:21 PM Arv Evans <arvid.evans@...> wrote:

The Arduino IDE, and most other IDEs include "find" and "find next"  in the edit commands.
This is very similar to the now ancient UNIX grep, fgrep, etc that eventually made its way into
several DOS editors.  Linux has continued the grep legacy in original and several new forms.
Not sure but I would think that Apple's OSX would also include the function as it was there in
original BSD UNIX.  It is also present in the shell programming tool for my Linux based
Android cell phone.

Us real old timers might use use SED (stream editor)to find and change specific words in
one pass.  This is handy for changing all occurrences of a word in the whole document.

Arv K7HKL
_._

On Mon, Jul 16, 2018 at 3:07 PM AA9GG < paul.aa9gg@...> wrote:
I remember GREP from the old DOS days.  Most editors for programming have a search feature. One could also load the code into a text editor and use its search function.  


Virus-free. www.avast.com

On Sun, Jul 15, 2018 at 11:22 AM, Jack Purdum via Groups.Io <jjpurdum@...> wrote:
 
I think we all run into situations where we need to find the definition of a variable or object in a large set of files. The UNIX tool Grep is perfect for doing that. The Grep version I use is not longer available, but I just downloaded and tried this version and it seems to work well:



If you want to change the data type of a variable, use Grep and type in the variable name, supply a search path, and BINGO it finds all occurrences of that string in the directory/subdirectories seach.

Jack, W8TEE



On Sunday, July 15, 2018, 11:06:15 AM EDT, Lee < mr.olson@...> wrote:


Thanks Mike,  I did not know about General coverage mode.  It seems to step buy .1MHZ  which is what I was trying to do.  Thanks to the others for the WWV ideas but my reference to WWV was an example. 

My changes work as I wanted but I still would like to figure out how to make it display correctly.  I cannot find where to change the data type to unsigned long.
--
Lee - N9LO  "I Void Warranties"

 

 

 




--
Paul Mateer, AA9GG
Elan Engineering Corp.
www.elanengr.com
NAQCC 3123, SKCC 4628

 

 

Re: Mike element

iz oos
 

So, would - 24db be 20db more sensitive than - 44db?


Il 16/lug/2018 22:26, "k1yw via Groups.Io" <k1yw=mail.ru@groups.io> ha scritto:
0 dB = 1 volt per Pascal
-24dB = .0.063 V/Pa
-44 db = 0.0063 V/Pa

Re: Mike element

Jerry Gaffke
 

Yes, you have it right.

For a given sound pressure into the mike,
the -24 dB mike creates a voltage that is 10 times bigger than the -44 dB mike.
A 10 times bigger voltage into a fixed resistance means 100 times more power,
since power in watts = volts * amps =   volts * volts/ohms.
With 100 times more power, that's 10 * log(100) = 20 dB more power.

If the mike were zero dB, we'd get 1 volt from the mike.
Since the voltages we are dealing with are less than one volt, 
we get negative numbers when representing the values in dB.

Jerry, KE7ER


On Mon, Jul 16, 2018 at 04:58 PM, iz oos wrote:

So, would - 24db be 20db more sensitive than - 44db?


Il 16/lug/2018 22:26, "k1yw via Groups.Io" <k1yw=mail.ru@groups.io> ha scritto:
. . .

 

0 dB = 1 volt per Pascal
-24dB = .0.063 V/Pa
-44 db = 0.0063 V/Pa

Re: Mike element

Gordon Gibby <ggibby@...>
 

With that level of sensitivity, perhaps no preamp at all is needed with the bitx  series.

Available for three dollars at digikey. 

Thanks for pointing it out and giving that educational lecture!


On Jul 16, 2018, at 21:51, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

Yes, you have it right.

For a given sound pressure into the mike,
the -24 dB mike creates a voltage that is 10 times bigger than the -44 dB mike.
A 10 times bigger voltage into a fixed resistance means 100 times more power,
since power in watts = volts * amps =   volts * volts/ohms.
With 100 times more power, that's 10 * log(100) = 20 dB more power.

If the mike were zero dB, we'd get 1 volt from the mike.
Since the voltages we are dealing with are less than one volt, 
we get negative numbers when representing the values in dB.

Jerry, KE7ER


On Mon, Jul 16, 2018 at 04:58 PM, iz oos wrote:

So, would - 24db be 20db more sensitive than - 44db?


Il 16/lug/2018 22:26, "k1yw via Groups.Io" <k1yw=mail.ru@groups.io> ha scritto:
. . .

 

0 dB = 1 volt per Pascal
-24dB = .0.063 V/Pa
-44 db = 0.0063 V/Pa

Re: Finding variables in source code

Jon Titus, KZ1G <tituskz1g@...>
 

The problem with how to locate variables also involves how programmers label them.  Too many books, teachers, and hobbyists use nonsense variables such as i, j, index, ptr, and so on as variable names.  Use variable names that indicate how you use them--Keyboard_Input, XMIT_Switch_State--and you save yourself and others endless searches and wasted time.
--
Jon Titus, KZ1G
Herriman, UT USA

Re: Windows Serial Port Problem

Jon Titus, KZ1G <tituskz1g@...>
 

Counterfeit boards bear marks that make them look like Arduino.cc-produced boards.  (Much like counterfeit watches marked as "Rolex.")  People can get tricked into buying boards with a USB, or other chip, that makes them compatible only after they download special drivers, etc.  If a company produces an Arduino clone they should mark it as such.  They also should note that a given board is compatible with an Arduino XXX, but is a product not of Arduino.cc but of another company.  Be careful what you buy and read the specifications carefully.  Just my opinion from experiences with Arduino boards.
--
Jon Titus, KZ1G
Herriman, UT USA

Re: Finding variables in source code

Jack, W8TEE
 

It depends. I use i, j, and index quite often in my code and find nothing wrong with it because those variables are almost always used for the same purpose and are rarely the source of program bugs. Everyone has their own coding style...unless you work as a programmer where style is dictated. Personally, I never use an underscore in a variable name for two reasons: 1) double-underscores were typically used as system variables and I still think that when I see them (it's a personal problem), and 2) while I can probably type 70wpm, the underscore key slows me down because I rarely use it. Some coding conventions I've found useful:

    1. Start variable names with a lowercase letter, and only cap the first letter of sub-words: keyboardInput, xmitSwitchState, ptrSisters.
    2. Start function names with an uppercase letter. That way you can tell in a glance whether it's a variable or a function. That's especially useful when you use pointer to         functions.
    3. Variables are like nouns in a sentence. Typically they reflect something of interest in the program and the name should convey that.
    4. Make the name long enough to convey that interest, but short enough you don't find it burdensome to type it over and over.
    5. Function are like verbs in a sentence. Typically they reflect an action taken and the function name should reflect the action, but not the means of the action. That is,         SortList() is a better name than BubbleSortList() because the former says what's to be done, while the latter says what's to be done and here's how I'm going to do it.
        a. Functions are black boxes with no windows. It's nobody else's business what goes on inside. What happens in functions stays in functions. Do you really want to force             users to recode their programs because you stopped using a Bubble Sort and switched to a Shell Sort? Hint: NO.
    6. Make functions cohesive. It you cannot say what a function does in two sentences, it's probably trying to do too many things. Break it into two smaller, and probably more         reusable, functions. Beginning students too often try to write Swiss Army Knife functions; they do a lot, but nothing well. Rarely is a function with a long parameter list a         cohesive function. Passing in flag variables is a dead giveaway that you're trying to make the function do too many things.
    7. Learn how to read and use complex data definitions. For example, what does this definition define:

                double (*(*pf)())[3][4];

        It's easier than you think to figure this out using the Right-Left Rule. (See:http://jdurrett.ba.ttu.edu/3345/handouts/RL-rule.html) Because C allows you to "create" new data types, it's an extremely robust and power language.

Writing C code is a personal thing and everyone is free to write it anyway they want as long as the compiler can parse it. However, when you know someone else has to read it, clarity starts to gain importance and style plays a part, too.

Jack, W8TEE

On Monday, July 16, 2018, 11:13:12 PM EDT, Jon Titus, KZ1G <tituskz1g@...> wrote:


The problem with how to locate variables also involves how programmers label them.  Too many books, teachers, and hobbyists use nonsense variables such as i, j, index, ptr, and so on as variable names.  Use variable names that indicate how you use them--Keyboard_Input, XMIT_Switch_State--and you save yourself and others endless searches and wasted time.
--
Jon Titus, KZ1G
Herriman, UT USA

Re: New file uploaded to BITX20@groups.io

Michel Dupuy
 

Hi Merrell, I tried the ubitx_35B7.tft version and there is always the problem. I solved it by modifying the code: (replace 10 by 12)


//Draw Smeter

  if(pm.cp.val!=-1)

  {

    jSMeter.val=pm.cp.val*12  <—— 10

    pm.cp.val=-1


It works fine, I do not know if it's the right solution because I'm not an expert.
That's why and thank you.

Michel F1GTXLe 17 juil. 2018 à 00:05, Allen Merrell via Groups.Io <kn4ud@...> a écrit :

Michel, I made some changes in the scale on the s meter, give it a try and let me know how it works. 
Thanks for testing.
kn4ud
--
Allen  Merrell

Re: HDMI display

Tom, wb6b
 

I agree that taking advantage of the CAT interface and using a second computer, that is HDMI capable, is probably the most practical approach. 

However:

One big advantage of the Arduino computers is they make writing programs interacting I/O pins possible in an easy and understandable way. 

I stumbled upon this library that brings the same type of I/O programming simplicity to the Raspberry Pi. http://wiringpi.com

Assuming a Raspberry Pi Zero (which has an HDMI output) is not too big of an RF noise factory, one could replace the Nano with the Pi Zero.

For hacking something like this together, rather than remove the Nano from the Raduino board, you could reprogram the Raduino to be an I2C to LCD display adaptor and drive the LCD display (assuming you may like to have an LCD display in addition to an HDMI display) and the Si5351 chip from the Rpi over the I2C bus. Then connect I/O pins from the Rpi, as needed, to the back of the Raduino to let the Rpi directly take over the I/O functionally that was handled by the Nano when it was running the uBITX firmware.

Tom, wb6b

Re: Windows Serial Port Problem

m5fra2@...
 

But they are not counterfeit as the hardware and software is open source.

 

 

From: BITX20@groups.io <BITX20@groups.io> On Behalf Of Jon Titus, KZ1G
Sent: 17 July 2018 04:20
To: BITX20@groups.io
Subject: Re: [BITX20] Windows Serial Port Problem

 

Counterfeit boards bear marks that make them look like Arduino.cc-produced boards.  (Much like counterfeit watches marked as "Rolex.")  People can get tricked into buying boards with a USB, or other chip, that makes them compatible only after they download special drivers, etc.  If a company produces an Arduino clone they should mark it as such.  They also should note that a given board is compatible with an Arduino XXX, but is a product not of Arduino.cc but of another company.  Be careful what you buy and read the specifications carefully.  Just my opinion from experiences with Arduino boards.
--
Jon Titus, KZ1G
Herriman, UT USA


Virus-free. www.avast.com

Re: Mike element

iz oos
 

Thanks Jerry, I had always thought the opposite, the lower the more sensitive just like sensitivity in a receiver. So, I was wrong. What about sensitivity in headphones and speakers?


Il 17/lug/2018 04:29, "Gordon Gibby" <ggibby@...> ha scritto:
With that level of sensitivity, perhaps no preamp at all is needed with the bitx  series.

Available for three dollars at digikey. 

Thanks for pointing it out and giving that educational lecture!



On Jul 16, 2018, at 21:51, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

Yes, you have it right.

For a given sound pressure into the mike,
the -24 dB mike creates a voltage that is 10 times bigger than the -44 dB mike.
A 10 times bigger voltage into a fixed resistance means 100 times more power,
since power in watts = volts * amps =   volts * volts/ohms.
With 100 times more power, that's 10 * log(100) = 20 dB more power.

If the mike were zero dB, we'd get 1 volt from the mike.
Since the voltages we are dealing with are less than one volt, 
we get negative numbers when representing the values in dB.

Jerry, KE7ER


On Mon, Jul 16, 2018 at 04:58 PM, iz oos wrote:

So, would - 24db be 20db more sensitive than - 44db?


Il 16/lug/2018 22:26, "k1yw via Groups.Io" <k1yw=mail.ru@groups.io> ha scritto:
. . .

 

0 dB = 1 volt per Pascal
-24dB = .0.063 V/Pa
-44 db = 0.0063 V/Pa


Re: 3.2in Nextion display now looks great.

Malcolm
 

Thank you Allen, I was able to remove a number of switches from my original case after changing over to the Nextion screen. I also changed some colors using the Nextion editor, just for my preference! Apologies for the incorrect spelling of your surname in my original post. I have attached a picture of my original ubitx to show the improvement. 

Re: Question about Nextion display and firmware

Mike Woods
 

Then it will definitely need some changes to the sketch!   The i2c pins are different for a start.  I'm not sure what else would need modifying.

Mike

On 17/07/18 4:58 AM, Bo Barry wrote:
Mike, I think he wanted a hex file compiled on a mega2560 not nano.
  I was going to do that and give him the link to the uploader program. Bo W4GHV 


--
Mike Woods
mhwoods@...

Re: Question about Nextion display and firmware

f1apy - Jacques
 

Hello Mike and Bo,

 

Thank’s for your responds, I agree with Mike, I need the sketch sources, for some modifications.

eg: pins assignations, specifics functions for myself and other choices.

I can redevelop a new firmware, but the CEC firmware is very pleasant and I appreciate this very well.

Jan have make a fantastic job and why to reinvent the wheel ?

73’s de Jacques – F1APY

 

From: BITX20@groups.io [mailto:BITX20@groups.io] On Behalf Of Mike Woods
Sent: Tuesday, July 17, 2018 10:05 AM
To: BITX20@groups.io
Subject: Re: [BITX20] Question about Nextion display and firmware

 

Then it will definitely need some changes to the sketch!   The i2c pins are different for a start.  I'm not sure what else would need modifying.

Mike

On 17/07/18 4:58 AM, Bo Barry wrote:

Mike, I think he wanted a hex file compiled on a mega2560 not nano.
  I was going to do that and give him the link to the uploader program. Bo W4GHV 

 

--
Mike Woods
mhwoods@...

Re: uBitx Version 3 and my homebrewed enclosure complete - Well Almost!! #ubitx

Jose Silva
 

Hello all

                       Fine job Juddie, congratulations!

73
Saulo
PY7EG

2018-07-15 14:40 GMT-03:00 WD8WV <juddie.d.burgess@...>:

Well, when I first posted about my uBitx being done, I made a mistake and in the title I typed QCX!  DUH!!!  Well, here I am again with my completed uBitx (not QCX).  I only have a few mods left to do, but right now I am having all kinds of issues trying to get the KD8CEC S-Meter modification done using the LM358 chip.  But I have that mod left to do, the TX/RX pop mod and the AGC mod by ND6T (I think that is right) to do.  I have already did the mod and added an RF gain control with a 1K potentiometer.  I created my own bezel for the front of my homebrewed enclosure. I also added a USB male to female adapter so I don't have to remove the cover to update the firmware.  Still need to get the SD card ribbon cable extender to plug into the Nextion display so I won't have to remove the display to update the tft files on the display.

73
Juddie WD8WV

 Here are some pictures.
--
Judd, WD8WV


Re: ADE-1-24

Razvan (M0HZH)
 

Theoretically the mixer (transformers, diodes) should be balanced and whether you ground pin 2 or pin 5 makes no difference, especially within the specified working range (0.5-500MHz). However, realistically you might get different LO leakage on the RF and IF ports, but that is over -50dBc on both ports at HF so not really something to worry about. Look at the Isolation L-R and Isolation L-I in the ADE1 datasheet, the values are slightly different:

https://ww2.minicircuits.com/pdfs/ADE-1.pdf

Cheers,
Razvan.

Re: ADE-1-24

pa0jen <pa0jen@...>
 

Hi Razvan,
 
The pins of interest are pin 2 and 5.
Since they belong to the other transformer, you might expect different LO leakage at higher frequencies.
 
Other than that, you will get a lot of bang for the buck.
 
73,
Han

Virusvrij. www.avg.com

Re: Windows Serial Port Problem

Dennis Zabawa
 

Agreed - How can you "counterfeit" Open Source products??

Re: New file uploaded to BITX20@groups.io

Allen Merrell
 

Michel, thanks for sharing this.  I will check this out and make changes.
Have you seen any other problems that should be addressed.
Thanks again for sharing this issue.

kn4ud
--
Allen  Merrell

ubitx issue

Richard E Neese
 

I was using my ubitx v4 with a 12v 3a power brick all was going well. then it powered off and back on on its own and now when I transmit I get a high powe rcarrier and squeel but no audio .