Topics

Reed's sketches #nano #arduino #ubitxv6


Reed N
 

Jack is spot on about needing all the files, and the benefit of reduced compile times. The easiest way is to click the green download button, then choose to download the full zip file.

I'd also add that its way easier to navigate multiple single-job files than a single monolithic ino file. There's a bit of a curve in knowing which pieces are in which files, but compartmentalized code pieces make it easy to figure out where dependencies are, and where related code pieces are.



Reed


Aaron K5ATG
 

Thank you Jack, I do understand now. It is greatly appreacheated.

 

72

Aaron K5ATG

K5ATG Blog

QRPARCI # 16443

GQRP # 16389

4SQRP # 1080

 

From: Jack, W8TEE via groups.io
Sent: Friday, May 29, 2020 3:12 PM
To: BITX20@groups.io
Subject: Re: [BITX20] Reed's sketches #arduino #nano #ubitxv6

 

Aaron:

 

Place all of the files you see from the download in the same directory. Indeed, they MUST all be in the same directory. Now load the IDE, move to the new project directory and double-click on ubitxv6.ino. The IDE will load all of the files into the IDE. The *.ino file is always the first one (left-most tab) in the Source Code Window. All of the other *.cpp and *.h files will appear in their own tabs across the top of the Source Code Window in alpha order:

Why didn't Reed just use one big INO file? The biggest win is that the Arduino compiler supports incremental compiles. In other words, if you're working on just 1 of the 60+ files and you recompile, the IDE compiler is smart enough to only recompile that particular file. The linker takes the other (cached) files and combines them into an executable for upload. On a project I worked on with 11000+ lines of code, the first compile in the morning took about 1 minute on a very fast machine, but subsequent recompiles were typically 10 seconds or less. If you save 50 seconds per compile and do 30 of those a day, that saves you 25 minutes of thumb-twiddling each day.

 

Long answer to a short question...

 

Jack, W8TEE

 

 

On Friday, May 29, 2020, 3:30:28 PM EDT, Aaron K5ATG via groups.io <k5atg@...> wrote:

 

 

Thank you Jack,

I was looking at all of the files and was thinking, which one do I need or want.

I’m completely guessing here, do I add the sketches that Reed has to the existing default sketch in my Arduino Nano one at a time to see if I like the change in the performance?

 

72

Aaron K5ATG

K5ATG Blog

QRPARCI # 16443

GQRP # 16389

4SQRP # 1080

 

From: Jack, W8TEE via groups.io
Sent: Friday, May 29, 2020 12:59 PM
To: BITX20@groups.io
Subject: Re: [BITX20] Reed's sketches #arduino #nano #ubitxv6

 

The main entry point for any Arduino project is the file that contains setup() and loop(). The file that holds those two functions must have the secondary file name *.ino. For Reed's code, the file is ubitxv6.ino. The purpose of the setup() function is to establish the environment in which the code is to run. The purpose of loop() is to provide a continuously-running body of code and is the work horse for the program. I would start with setup() and then proceed to loop(), looking at the function calls in each. If you need help understanding the C code, I can give you a (very biased) book recommendation.

 

Jack, W8TEE

 

On Friday, May 29, 2020, 1:27:16 PM EDT, Aaron K5ATG via groups.io <k5atg@...> wrote:

 

 

I'm still learning Arduino and such and I was told to check out Reed's sketches for the display for the v6 uBITX. I went to the GitHub site uBITX v6 Arduino Sketch
There is a huge list of files there. I'm not exactly sure where to start or what to do. 
Any help would be appreciated. 


--
Jack, W8TEE

 


--
Jack, W8TEE

 


Jack, W8TEE
 

Aaron:

Place all of the files you see from the download in the same directory. Indeed, they MUST all be in the same directory. Now load the IDE, move to the new project directory and double-click on ubitxv6.ino. The IDE will load all of the files into the IDE. The *.ino file is always the first one (left-most tab) in the Source Code Window. All of the other *.cpp and *.h files will appear in their own tabs across the top of the Source Code Window in alpha order:
Inline image
Why didn't Reed just use one big INO file? The biggest win is that the Arduino compiler supports incremental compiles. In other words, if you're working on just 1 of the 60+ files and you recompile, the IDE compiler is smart enough to only recompile that particular file. The linker takes the other (cached) files and combines them into an executable for upload. On a project I worked on with 11000+ lines of code, the first compile in the morning took about 1 minute on a very fast machine, but subsequent recompiles were typically 10 seconds or less. If you save 50 seconds per compile and do 30 of those a day, that saves you 25 minutes of thumb-twiddling each day.

Long answer to a short question...

Jack, W8TEE


On Friday, May 29, 2020, 3:30:28 PM EDT, Aaron K5ATG via groups.io <k5atg@...> wrote:


Thank you Jack,

I was looking at all of the files and was thinking, which one do I need or want.

I’m completely guessing here, do I add the sketches that Reed has to the existing default sketch in my Arduino Nano one at a time to see if I like the change in the performance?

 

72

Aaron K5ATG

K5ATG Blog

QRPARCI # 16443

GQRP # 16389

4SQRP # 1080

 

From: Jack, W8TEE via groups.io
Sent: Friday, May 29, 2020 12:59 PM
To: BITX20@groups.io
Subject: Re: [BITX20] Reed's sketches #arduino #nano #ubitxv6

 

The main entry point for any Arduino project is the file that contains setup() and loop(). The file that holds those two functions must have the secondary file name *.ino. For Reed's code, the file is ubitxv6.ino. The purpose of the setup() function is to establish the environment in which the code is to run. The purpose of loop() is to provide a continuously-running body of code and is the work horse for the program. I would start with setup() and then proceed to loop(), looking at the function calls in each. If you need help understanding the C code, I can give you a (very biased) book recommendation.

 

Jack, W8TEE

 

On Friday, May 29, 2020, 1:27:16 PM EDT, Aaron K5ATG via groups.io <k5atg@...> wrote:

 

 

I'm still learning Arduino and such and I was told to check out Reed's sketches for the display for the v6 uBITX. I went to the GitHub site uBITX v6 Arduino Sketch
There is a huge list of files there. I'm not exactly sure where to start or what to do. 
Any help would be appreciated. 


--
Jack, W8TEE

 


--
Jack, W8TEE


Aaron K5ATG
 

Thank you Jack,

I was looking at all of the files and was thinking, which one do I need or want.

I’m completely guessing here, do I add the sketches that Reed has to the existing default sketch in my Arduino Nano one at a time to see if I like the change in the performance?

 

72

Aaron K5ATG

K5ATG Blog

QRPARCI # 16443

GQRP # 16389

4SQRP # 1080

 

From: Jack, W8TEE via groups.io
Sent: Friday, May 29, 2020 12:59 PM
To: BITX20@groups.io
Subject: Re: [BITX20] Reed's sketches #arduino #nano #ubitxv6

 

The main entry point for any Arduino project is the file that contains setup() and loop(). The file that holds those two functions must have the secondary file name *.ino. For Reed's code, the file is ubitxv6.ino. The purpose of the setup() function is to establish the environment in which the code is to run. The purpose of loop() is to provide a continuously-running body of code and is the work horse for the program. I would start with setup() and then proceed to loop(), looking at the function calls in each. If you need help understanding the C code, I can give you a (very biased) book recommendation.

 

Jack, W8TEE

 

On Friday, May 29, 2020, 1:27:16 PM EDT, Aaron K5ATG via groups.io <k5atg@...> wrote:

 

 

I'm still learning Arduino and such and I was told to check out Reed's sketches for the display for the v6 uBITX. I went to the GitHub site uBITX v6 Arduino Sketch
There is a huge list of files there. I'm not exactly sure where to start or what to do. 
Any help would be appreciated. 


--
Jack, W8TEE

 


Jack, W8TEE
 

The main entry point for any Arduino project is the file that contains setup() and loop(). The file that holds those two functions must have the secondary file name *.ino. For Reed's code, the file is ubitxv6.ino. The purpose of the setup() function is to establish the environment in which the code is to run. The purpose of loop() is to provide a continuously-running body of code and is the work horse for the program. I would start with setup() and then proceed to loop(), looking at the function calls in each. If you need help understanding the C code, I can give you a (very biased) book recommendation.

Jack, W8TEE

On Friday, May 29, 2020, 1:27:16 PM EDT, Aaron K5ATG via groups.io <k5atg@...> wrote:


I'm still learning Arduino and such and I was told to check out Reed's sketches for the display for the v6 uBITX. I went to the GitHub site uBITX v6 Arduino Sketch
There is a huge list of files there. I'm not exactly sure where to start or what to do. 
Any help would be appreciated. 

--
Jack, W8TEE


Aaron K5ATG
 

I'm still learning Arduino and such and I was told to check out Reed's sketches for the display for the v6 uBITX. I went to the GitHub site uBITX v6 Arduino Sketch
There is a huge list of files there. I'm not exactly sure where to start or what to do. 
Any help would be appreciated.