开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Board files for the ATTiny85 #sBitx


 

Can someone point me to the board definition files and the Write library to use with the SWR/Power sensor in the Sbitx?

The one board file that I did find is from DigiSpark.? I can compile and load the sample blink program.? I can not compile the swr_bridge.ini sketch.? I get an error that Wire.begin(8) is not defined.

Error Log:
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino: In function 'void setup()':
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:31:15: error: no matching function for call to 'USI_TWI::begin(int)'
? ?Wire.begin(8);? ? ? ? ? ? ? ? // join i2c bus with address #8
? ? ? ? ? ? ? ?^
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:31:15: note: candidate is:
In file included from C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:19:0:
C:\Users\elhan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:57:13: note: void USI_TWI::begin()
? ? ?void? ? begin();
? ? ? ? ? ? ?^
C:\Users\elhan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:57:13: note:? ?candidate expects 0 arguments, 1 provided
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:32:8: error: 'class USI_TWI' has no member named 'onRequest'
? ?Wire.onRequest(requestEvent); // register event
? ? ? ? ^
?
exit status 1
?
Compilation error: no matching function for c


Any help is apricated.
73
Evan
AC9TU


Jack, W8TEE
 

Evan:

The error message: no matching function for call to 'USI_TWI::begin(int) is almost always associated with the wrong library...wrong, not missing. The second error says that one argument was supplied, but 0 arguments were expected. Again, wrong library.

There are multiple Wire libraries out there. I would start searching the Wire libraries that are available, looking at the begin() method in the Wire class. Search for begin() or begin(void) and see which libraries have the proper prototype.

Jack, W8TEE

On Wednesday, May 31, 2023 at 10:01:12 PM EDT, Evan Hand <elhandjr@...> wrote:


Can someone point me to the board definition files and the Write library to use with the SWR/Power sensor in the Sbitx?

The one board file that I did find is from DigiSpark.? I can compile and load the sample blink program.? I can not compile the swr_bridge.ini sketch.? I get an error that Wire.begin(8) is not defined.

Error Log:
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino: In function 'void setup()':
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:31:15: error: no matching function for call to 'USI_TWI::begin(int)'
? ?Wire.begin(8);? ? ? ? ? ? ? ? // join i2c bus with address #8
? ? ? ? ? ? ? ?^
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:31:15: note: candidate is:
In file included from C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:19:0:
C:\Users\elhan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:57:13: note: void USI_TWI::begin()
? ? ?void? ? begin();
? ? ? ? ? ? ?^
C:\Users\elhan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:57:13: note:? ?candidate expects 0 arguments, 1 provided
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:32:8: error: 'class USI_TWI' has no member named 'onRequest'
? ?Wire.onRequest(requestEvent); // register event
? ? ? ? ^
?
exit status 1
?
Compilation error: no matching function for c


Any help is apricated.
73
Evan
AC9TU

--
Jack, W8TEE


Jack, W8TEE
 

Evan:

I forgot: the error message: Wire.onRequest(requestEvent) suggests the library has a method named onRequest() with an argument that's likely an int. You might try search for this method first.

Jack, W8TEE

On Wednesday, May 31, 2023 at 10:09:20 PM EDT, Jack, W8TEE via groups.io <jjpurdum@...> wrote:


Evan:

The error message: no matching function for call to 'USI_TWI::begin(int) is almost always associated with the wrong library...wrong, not missing. The second error says that one argument was supplied, but 0 arguments were expected. Again, wrong library.

There are multiple Wire libraries out there. I would start searching the Wire libraries that are available, looking at the begin() method in the Wire class. Search for begin() or begin(void) and see which libraries have the proper prototype.

Jack, W8TEE

On Wednesday, May 31, 2023 at 10:01:12 PM EDT, Evan Hand <elhandjr@...> wrote:


Can someone point me to the board definition files and the Write library to use with the SWR/Power sensor in the Sbitx?

The one board file that I did find is from DigiSpark.? I can compile and load the sample blink program.? I can not compile the swr_bridge.ini sketch.? I get an error that Wire.begin(8) is not defined.

Error Log:
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino: In function 'void setup()':
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:31:15: error: no matching function for call to 'USI_TWI::begin(int)'
? ?Wire.begin(8);? ? ? ? ? ? ? ? // join i2c bus with address #8
? ? ? ? ? ? ? ?^
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:31:15: note: candidate is:
In file included from C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:19:0:
C:\Users\elhan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:57:13: note: void USI_TWI::begin()
? ? ?void? ? begin();
? ? ? ? ? ? ?^
C:\Users\elhan\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\Wire/Wire.h:57:13: note:? ?candidate expects 0 arguments, 1 provided
C:\Users\elhan\OneDrive\Documents\_Dev\HamRadio\_uBitx\sBITX\sBITX V2\sbitx-main v2.1\sbitx-main\swr_bridge\swr_bridge.ino:32:8: error: 'class USI_TWI' has no member named 'onRequest'
? ?Wire.onRequest(requestEvent); // register event
? ? ? ? ^
?
exit status 1
?
Compilation error: no matching function for c


Any help is apricated.
73
Evan
AC9TU

--
Jack, W8TEE

--
Jack, W8TEE


 

Evan - Install the ATTTinyCore Board Support Package by Spence Konde,

The "Additional Boards Manager URL" is???

The package supports the Digispark with the ATTiny85.

Recommend also setting the clock frequency to 8 MHz, for in-spec operation of the ATTiny85 at 3.3 Volts.

There are over 50 messages captured on this topic here on the forum under the topic "swr_bridge.ino"

73; Steve, N3SB


 

Steve,

It was the board selection that was at issue.? When I changed to the ATtinyCore, the compile went without a problem.? I was also able to load the DigiSpark board.

Now I need to build out the sensor and test it.

Thank you and Jack for the information.
73
Evan
AC9TU


 

Hi Evan,

Are you building the sensor from the V2 schematics? ?If so, I am curious if its output is in range with the Tiny 85’s input. ?As you probably know, I had to add a voltage divider before the Tiny 85 because the pre-built sensor I bought had an over-than 3V3 possibility. ?Also, if you don’t already know this, the V2 schematic has an error. ?It may have been corrected but it originally had the Tiny 85’s input, FWD and REV, swapped.

Good luck, Scott


 

Hi Scott,

I read the thread you started on the swr_sensor and was aware of the potential voltage issue.? I have not yet tested the voltage output of the directional coupler I purchased.? I first wanted to verify that I could program the ATTiny85.

At this point, I have two options:
1 - Build out as you did a separate board with an ATTiny85 chip
2 - Use the DigiSpark clone board that I confirmed I could program.

In either case, I will need to build a board.? For choice 1, it would be the board you did.? Choice 2 is a level shifter for the I2C interface, as the DigiSpark clone is set up for 5 volt operation.

I am leaning towards choice 2 as that gives a faster clock speed and interrupt handling.? The cost is more components.

Thank you for the postings and for documenting how you solved the interface.
73
Evan
AC9TU


 

Evan - the DigiSpark board will run fine at 3.3 Volts, in which case you do not need level shifters. I do recommend changing the clock setting to 8 MHz though. Still plenty fast enough for I2C communications.

73; Steve, N3SB


 

On Thu, Jun 1, 2023, at 08:08 AM, Steve Beckman wrote:
Evan - the DigiSpark board will run fine at 3.3 Volts, in which case you do not need level shifters. I do recommend changing the clock setting to 8 MHz though. Still plenty fast enough for I2C communications.

73; Steve, N3SB
Steve,

Can you point me to the documentation on how to set the clock speed?? It would also help to know how to bypass the 5 volt regulator on the board.

I call it a DigiSpark board, as that was the first board that I could get the sample program to run.? I had to change to the?ATtiny85 (Micronucleus / DigiSpark) board to get the sketch from Ashhar Farhan to compile.

Here is a picture of the two ATTiny85 boards that I have.



73
Evan
AC9TU


 

Hi Evan;

After you have selected the board type as ATTiny85 ( Micronucleus / DigiSpark ), additional options specific to that board type will appear in the Tools menu of the Arduino IDE (I'm using version 1.8.19), below where you selected the board type. You will see an option to select the clock speed.

I'm providing the 3.3 Volts into the DigiSpark module at the output of the 5V regulator.? 3.3V, Ground, SCL, and SCA are available at the RTC module on the male pins.

73; Steve, N3SB


 

Hi Steve,

I found the clock speed, so I will try connecting directly to the board.

Thank you!
73
Evan
AC9TU