Topics

Current Firmware

Dennis
 

I would like to upgrade my uBITX to the latest version (4 I believe), but don't know which one on Github to use.
I would appreciate a little direction. Also, where on my Mac do I put the file?

Thanks,
73, Dennis
W7DRW

Ashhar Farhan
 

The latest is 4.3. The repo is named ubitx4. Place it anywhere. As long as all the files are in the same folder.
- f

On Tue, 5 Jun 2018, 23:13 Dennis, <dennis@...> wrote:
I would like to upgrade my uBITX to the latest version (4 I believe), but don't know which one on Github to use.
I would appreciate a little direction. Also, where on my Mac do I put the file?

Thanks,
73, Dennis
W7DRW

Dennis
 

I'm sorry for being dense, but I still don't know which file to use. There are 9 listed on Github - non of which seem to be "the file".

Regards,
73, Dennis
W7DRW

Karl Heinz Kremer, K5KHK
 

Actually, all of them are "the file": You need all the .ino files in one folder, which needs to be named after the base name of the main file. In this case, when you go to https://github.com/afarhan/ubitx4, you will see that the main file is ubitx_v4.3_code.ino, which means that all these files need to be in a folder named ubitx_v4.3_code 

How do I know that this is the main project file? Because it is the only one that contains the setup() and loop() functions. They are an integral part of an Arduino "sketch". 
--
Karl Heinz - K5KHK

Gary Anderson
 

Green Button 'Clone or download' then download the zip file.
You put the folder containing multiple files into your Arduino "sketch" directory/folder
.. on a pc it can be found under the 'file -> preferences' tab.  I bet something similar on a mac.

Yes it may be a little confusing that there are multiple .ino files in one 'sketch'.
... and I'm pretty sure that the primary .ino file needs to have the same name as the folder in Arduino land.
Anyways, I put in a folder called "ubitx_v43" and renamed "ubitx_v4.3_code.ino" to "ubitx_v43.ino"

It compiled and linked, albeit quite a few warnings for someone so driven to clean-up :)

Regards,
Gary

Jack, W8TEE
 

I have cleaned those up, and changed the *.ino files to *.cpp files, except for the primary sketch file (i.e., the one with setup() and loop() in it) and created an appropriate header file for type checking on function calls. The two advanatages of doing this is:

1) type checking of parameter and return types on function calls
2) incremental compiles
3) it's easy to see what the sketch directory should be named

While I have cleaned up most of the warnings/errors, I have not touched the warnings coming from the library files, and there are a lot of those. To my knowledge, none are fatal. However, it do not want to go messing around with library files. Those should be fixed by the authors of those files, not me.

Jack, W8TEE

On Tuesday, June 5, 2018, 5:14:13 PM EDT, Gary Anderson <gary.ag5tx@...> wrote:


Green Button 'Clone or download' then download the zip file.
You put the folder containing multiple files into your Arduino "sketch" directory/folder
.. on a pc it can be found under the 'file -> preferences' tab.  I bet something similar on a mac.

Yes it may be a little confusing that there are multiple .ino files in one 'sketch'.
... and I'm pretty sure that the primary .ino file needs to have the same name as the folder in Arduino land.
Anyways, I put in a folder called "ubitx_v43" and renamed "ubitx_v4.3_code.ino" to "ubitx_v43.ino"

It compiled and linked, albeit quite a few warnings for someone so driven to clean-up :)

Regards,
Gary

Dennis
 

Hi, 
So what do I do about the nearly 50 error messages? I am just learning how to program in Arduino C and this is way above my skill level. (I'm only 67 pages into Jack's excellent book).

73, Dennis
W7DRW

Clark Martin
 

Fix one (the first one) and re-compile.  Frequently one error will produce multiple errors so it’s likely not as bad as it seems.

Clark Martin
KK6ISP

On Jun 5, 2018, at 6:49 PM, Dennis <dennis@...> wrote:

Hi, 
So what do I do about the nearly 50 error messages? I am just learning how to program in Arduino C and this is way above my skill level. (I'm only 67 pages into Jack's excellent book).

Tom, wb6b
 

Does the ubitx code rely on other libraries like "wire"? Missing libraries are a common cause of compile errors. 

I have installed many libraries over time, I may have needed dependencies already installed, so I don't know if the code won't compile for need of libraries when people are starting from scratch. 

Go to "Sketch", "Include Library", "Manage Libraries" to find libraries you may need. The error messages should mention what can't be found, and needed to be installed.

Ton, wb6b

Gary Anderson
 

Dennis,
Warnings are not errors.  If it compiles and links you are most likely all good to go.
This code has obviously been used and tested by others.
As far as warnings go, all that matters is that the assembly code generated works the way it is intended to work.

If this was a commercial radio, you would have bought it without open source firmware, and never even considered if the source code was warning free on compile.
You just care that it works as intended.

If you are getting 50 "Errors", something else is going wrong for you.
If you post the Errors, maybe someone could help you.

Regards,
Gary

Dennis
 

Hi Gary,
The following is the first of 8 pages of errors/warnings:
"

Arduino: 1.8.5 (Mac OS X), Board: "Arduino Nano, ATmega328P"

 

ubitx_cat.cpp:30: error: stray '\302' in program

  <title>ubitx4/ubitx_cat.ino at master · afarhan/ubitx4</title>

   ^

ubitx_cat.cpp:30: error: stray '\267' in program

sketch/ubitx_cat.cpp:131:367: warning: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

                                                                                                                                                                                                                                                                                                                                                                              ^

ubitx_cat.cpp:131: error: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

   ^

sketch/ubitx_cat.cpp:134:16: warning: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

                ^

ubitx_cat.cpp:134: error: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

           ^

sketch/ubitx_cat.cpp:164:10: warning: missing terminating ' character

     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="134364585" data-scoped-search-url="/afarhan/ubitx4/search" data-unscoped-search-url="/search" action="/afarhan/ubitx4/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />

          ^
"
73, Dennis
W7DRW

DJ2AG
 

Dennis, how did you download the sketch? The ubitx_cat.cpp doesn’t look like c code. It’s more like part of GitHub website code. Could happen if one use right click on the file for downloading instead using the green button firbclonenor zip download.
Which git repository were you using? I don’t see *.cpp files in Ashars repository, only *.ino Files.

73 Armin, DJ2AG

William Cullison
 

I always figure it out but I didn't realize what defined the main project file.

73 Bill WA8VIH/4

On Tue, Jun 5, 2018 at 4:44 PM, Karl Heinz Kremer, K5KHK <khk@...> wrote:
Actually, all of them are "the file": You need all the .ino files in one folder, which needs to be named after the base name of the main file. In this case, when you go to https://github.com/afarhan/ubitx4, you will see that the main file is ubitx_v4.3_code.ino, which means that all these files need to be in a folder named ubitx_v4.3_code 

How do I know that this is the main project file? Because it is the only one that contains the setup() and loop() functions. They are an integral part of an Arduino "sketch". 
--
Karl Heinz - K5KHK


Gary Anderson
 

Dennis,
It looks like you are trying to compile the GetHub HTML page.
Possibly,  you downloaded the web page and saved as a file called 'ubitx_cat.cpp', etc?

https://github.com/afarhan/ubitx4

then click on the Green Button 'Clone or download' button.
and download the zip file with all the files
.

Jack, W8TEE
 

Even on a  Mac, this looks like the wrong directory structure. (See first Yellow below.) This has been discussed here before. The second Yellow line suggests that a non-source file is compiling. Have no clue what that's about.


Jack, W8TEE

On Wednesday, June 6, 2018, 12:24:27 AM EDT, Dennis <dennis@...> wrote:


Hi Gary,
The following is the first of 8 pages of errors/warnings:
"

Arduino: 1.8.5 (Mac OS X), Board: "Arduino Nano, ATmega328P"

 

ubitx_cat.cpp:30: error: stray '\302' in program

  <title>ubitx4/ubitx_cat.ino at master · afarhan/ubitx4</title>

   ^

ubitx_cat.cpp:30: error: stray '\267' in program

sketch/ubitx_cat.cpp:131:367: warning: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

                                                                                                                                                                                                                                                                                                                                                                              ^

ubitx_cat.cpp:131: error: missing terminating ' character

   Microsoft is acquiring GitHub! <a href="https://blog.github.com/2018-06-04-github-microsoft/" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Read our blog">Read our blog</a> and <a href="https://blogs.microsoft.com/?p=52553832" class="text-bold text-white" data-ga-click="MS banner, click, link - text:Satya Nadella's post">Satya Nadella's post</a> to learn more.

   ^

sketch/ubitx_cat.cpp:134:16: warning: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

                ^

ubitx_cat.cpp:134: error: missing terminating ' character

           <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-remote="true" class="js-notice-dismiss" action="/settings/dismiss-notice/generic_site_banner" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="4nneNjpLRGXeOjfsjQDIXjjJeRqb0BUhZekajl15HLz0ReoE/ZJe9X1xthO2thzPOjGdUvYRWYdsI1ihjIKr1w==" />

           ^

sketch/ubitx_cat.cpp:164:10: warning: missing terminating ' character

     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="134364585" data-scoped-search-url="/afarhan/ubitx4/search" data-unscoped-search-url="/search" action="/afarhan/ubitx4/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />

          ^
"
73, Dennis
W7DRW

Jack, W8TEE
 

Missing libraries is a very common error that beginners make. In many cases, the programmer(s) who wrote the code supply the URL for libraries that are not distributed as part of the Arduino IDE. For example, this is near the top of the prototype header file in JackAl:

#include <Arduino.h>          // Standard with IDE
#include <EEPROM.h>           // Standard with IDE
#include <math.h>             // Standard with IDE
#include <SD.h>               // Standard with IDE
#include <Wire.h>             // Standard with IDE
#include <SPI.h>              // Standard with IDE
#include <stdio.h>            // Standard with IDE

#include <OpenAudio_ArduinoLibrary.h> // https://github.com/chipaudette/OpenAudio_ArduinoLibrary

#include <Adafruit_GFX.h>     // https://github.com/adafruit/Adafruit-GFX-Library
#include <Audio.h>            // https://github.com/PaulStoffregen/Audio
#include <RA8875.h>           // https://github.com/sumotoy/RA8875
#include <Rotary.h>           // https://github.com/brianlow/Rotary
#include <SerialFlash.h>      // https://github.com/PaulStoffregen/SerialFlash
#include <Time.h>             // https://github.com/PaulStoffregen/Time
#include <TimeLib.h>          // Part of Stoffregen library, done for backward compatibility
#include <TimerOne.h>         // Distributed with Teensy
#include <UTFT.h>             // http://www.rinkydinkelectronics.com/library.php?id=51
#include <URTouch.h>          // http://www.rinkydinkelectronics.com/library.php?id=92
#include <UTFT_Buttons.h>     // http://www.rinkydinkelectronics.com/library.php?id=61

If you get an error message stating that something "is not found", quite often it is a missing library. Providing a URL avoids confusion in locating the proper library because, in many cases, there are multiple libraries that use the same name (e.g., LiquidCrystal).

Jack, W8TEE


On Tuesday, June 5, 2018, 11:24:24 PM EDT, Tom, wb6b <wb6b@...> wrote:


Does the ubitx code rely on other libraries like "wire"? Missing libraries are a common cause of compile errors. 

I have installed many libraries over time, I may have needed dependencies already installed, so I don't know if the code won't compile for need of libraries when people are starting from scratch. 

Go to "Sketch", "Include Library", "Manage Libraries" to find libraries you may need. The error messages should mention what can't be found, and needed to be installed.

Ton, wb6b

Dennis
 

On Wed, Jun 6, 2018 at 06:29 am, Jack Purdum wrote:
Missing libraries is a very common error that beginners make
So how do we beginners determine which libraries are missing and where to find them? I'm going to try this exercise on a win10 machine later today. Perhaps it will work better than the mac. I don't understand why we can't be provided with a single compiled file to upload to the Arduino. I would suspect that most hams are not accomplished programmers.

Gary Anderson
 

Too bad the Arduino IDE doesn't have a GUI interface to 'upload' a .hex (or .elf) file.
    This would make it easy to share a single 'compiled file'/ machine code and you could just upload to the Arduino.
    Easy enough to share the .hex, but the next battle will be you figuring out how to upload it.
There is software available for a P.C. that does
https://sourceforge.net/projects/arduinodev/files/ArduinoBuilder/
But I haven't found such for a mac, or have a way to test using an intel based 'modern' mac.

You don't have to be an accomplished 'C programmer' to use the Arduino IDE.

I don't see any libraries used in Farhan's supplied code that isn't part of the standard Arduino IDE.

Dennis,
I'd be happy to send you a single 'flat' ino file (the one that the Arduino IDE creates during the compile / linking process) in a private mail if this makes things easier for you to get going.
If you would like this, send me your email address by responding to this post with the "private" button, and I will send you a single file sketch.
I did not clean up the code that generates the compiler warnings.  I have checked that the single flat file  compiles and links.

Regards,
Gary

Tom, wb6b
 

Hi Dennis,

It looks like what you are trying to compile is, the code you would see if you clicked on "view source code" in your browser while looking at the code on GitHub. Of course, it is possible that something was temporary wrong at GitHub when you tried to download the code.

Try this link to download the zip file for the code. https://github.com/afarhan/ubitx4/archive/master.zip

I believe the CEC firmware has compiled HEX files available. There were instructions for how to install a program on Windows that could program an Arduino from the HEX file. In my case, as I have a Mac, it was just easier to compile the CEC software and upload it from the Arduino Sketch. 

Hopefully the number of errors you get, if any, will be simple "not found" errors as Jack mentioned. Those would be the libraries you would install from the "Sketch", "Include Library", "Manage Libraries" dropdown. Jack also points out that libraries can be downloaded directly from URLs, but I think anything needed for the factory firmware would be obtainable using the Sketch user interface.

Hang in there, much of programming and compiling seems counterintuitive. But, once you begin find your way around it starts to make sense. Once it all makes sense you've gone off the deep end and become a real programmer.

Side note: Hmmm. Maybe all those dire warnings about Microsoft and GitHub have so quickly become reality. After all, look at the first error:
"warning: missing terminating ' character
    Microsoft is acquiring GitHub!"

The deal hasn't even closed yet, and here we are...

Tom, wb6b

Jack, W8TEE
 

So how do we beginners determine which libraries are missing and where to find them?

I would start by urging programmers to follow the convention I mentioned earlier, which is to provide the download URL for any non-Arduino libraries on the same line as their #include directive. Then at least you've know where to go to download the required libraries.

Jack, W8TEE

On Wednesday, June 6, 2018, 11:07:57 AM EDT, Dennis <dennis@...> wrote:


On Wed, Jun 6, 2018 at 06:29 am, Jack Purdum wrote:
Missing libraries is a very common error that beginners make
So how do we beginners determine which libraries are missing and where to find them? I'm going to try this exercise on a win10 machine later today. Perhaps it will work better than the mac. I don't understand why we can't be provided with a single compiled file to upload to the Arduino. I would suspect that most hams are not accomplished programmers.