Arduino Examples
You can find these examples also in the Arduino IDE by navigating to File -> Examples -> high-side-switch-ino.
Example |
Summary |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BTT600x-hss-advanced
Summary
Default high-side-switch advanced test. Compatible with BTT60xx variants.
Compatibility
Shield |
Included Variants |
Supported Channels |
---|---|---|
24V_SHIELD_BTT6030 |
Profet 0 (BTT6030-2ERA) |
2 |
Profet 1 (BTT6030-2ERA) |
2 |
|
Profet 2 (BTT6020-1ERA) |
1 |
Description
This example shows the usage of the offered functionalities of the shield. It has 2 parts:
Part A:
Switches a channel ON
Reads current through the switch, battery voltage and performs diagnosis in ‘ON’ state
Switches the channel OFF
Part B:
Switch multiple channels ‘ON’ at once
Switch multiple channels ‘OFF’ at once
BTT600x-hss-multiple-ch
Summary
High-side-switch example to operate multiple channels. Compatible with BTT60xx variants.
Compatibility
Shield |
Included Variants |
Supported Channels |
---|---|---|
24V_SHIELD_BTT6030 |
Profet 0 (BTT6030-2ERA) |
2 |
Profet 1 (BTT6030-2ERA) |
2 |
|
Profet 2 (BTT6020-1ERA) |
1 |
Description
This example demonstrates how to switch on/off multiple channels at once.
In total, there are 5 channels provided in this board. Through this example,
you can control these 5 channels at the same time by setting the required channels
to true in the switch_no[5]
where index-0 maps to channel 0. See below channel to port mapping:
Channel (in example code) |
Controls |
Mapped output port |
---|---|---|
|
Profet 0 (BTT6030-2ERA part 0 : channel 0) |
OUT 0.0 |
|
Profet 0 (BTT6030-2ERA part 0 : channel 1) |
OUT 0.1 |
|
Profet 1 (BTT6030-2ERA part 1 : channel 0) |
OUT 1.0 |
|
Profet 1 (BTT6030-2ERA part 1 : channel 1) |
OUT 1.1 |
|
Profet 2 (BTT6020-1ERA : channel 0) |
OUT 2 |
BTT600x-hss-single-ch
Summary
Basic High-side-switch example to operate single channel. Compatible with BTT60xx variants.
Compatibility
Shield |
Included Variants |
Supported Channels |
---|---|---|
24V_SHIELD_BTT6030 |
Profet 0 (BTT6030-2ERA) |
2 |
Profet 1 (BTT6030-2ERA) |
2 |
|
Profet 2 (BTT6020-1ERA) |
1 |
Description
This is a basic high-side-switch example that demonstrates how to switch on/off a specific channel.
Along with channel operation, you could also determine the sensed current of the channel.
In total, there are 5 channels provided in this board and you can select which channel to function by setting
correct number in switch_no
. See below switch to port mapping:
Channel (in example code) |
Controls |
Mapped output port |
---|---|---|
|
Profet 0 (BTT6030-2ERA part 0 : channel 0) |
OUT 0.0 |
|
Profet 0 (BTT6030-2ERA part 0 : channel 1) |
OUT 0.1 |
|
Profet 1 (BTT6030-2ERA part 1 : channel 0) |
OUT 1.0 |
|
Profet 1 (BTT6030-2ERA part 1 : channel 1) |
OUT 1.1 |
|
Profet 2 (BTT6020-1ERA : channel 0) |
OUT 2 |
BTS700x-hss-advanced
Summary
Default high-side-switch advanced test. Compatible with BTS7002, BTS7004, BTS7006 and BTS7008 variant.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS7002 |
|
Shield |
BTS7004 |
|
Shield |
BTS7006 |
|
Shield |
BTS7008 |
|
Description
This example shows the usage of all the offered functionalities of the shield. It has 2 parts:
Part A
Switches a channel ON
Reads current through the switch, battery voltage and performs diagnosis in ‘ON’ state
Switches the channel OFF
Reads current through the switch, battery voltage and performs diagnosis in ‘OFF’ state
Part B
Switch multiple channels ‘ON’ at once
Switch multiple channels ‘OFF’ at once
BTS700x-hss-multiple-ch
Summary
High-side-switch example to operate multiple channels. Compatible with BTS7002, BTS7004, BTS7006, BTS7008 variants.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS7002 |
|
Shield |
BTS7004 |
|
Shield |
BTS7006 |
|
Shield |
BTS7008 |
|
Description
This example demonstrates how to switch on/off multiple channels at once.
In total, there are 4 channels provided in this board. Through this example,
you can control these 4 channels at the same time by setting the required channels
to true in the switch_no[4]
where index-0 maps to channel 1. See below channel to port mapping:
Channel (in example code) |
Controls |
Mapped output port |
---|---|---|
|
BTS700x U1 |
OUT1 |
|
BTS700x U2 |
OUT2 |
|
BTS700x U3 |
OUT3 |
|
BTS700x U4 |
OUT4 |
BTS700x-hss-single-ch
Summary
Basic High-side-switch example to operate single channel. Compatible with BTT7002, BTS7004, BTS7006 and BTS7008 variants.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS7002 |
|
Shield |
BTS7004 |
|
Shield |
BTS7006 |
|
Shield |
BTS7008 |
|
Description
This is a basic high-side-switch example that demonstrates how to switch on/off a specific channel.
Along with channel operation, you could also determine the sensed current of the channel.
In total, there are 4 channels provided in the board and
you can select which channel to operate by setting correct number in switch_no
. See below channel to port mapping:
Channel (in example code) |
Controls |
Mapped output port |
---|---|---|
|
BTS700x U1 |
OUT1 |
|
BTS700x U2 |
OUT2 |
|
BTS700x U3 |
OUT3 |
|
BTS700x U4 |
OUT4 |
BTS5001x-hss-advanced
Summary
Default high-side-switch advanced test. Compatible with BTS50010 and BTS50015 variants.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS50010 |
|
Shield |
BTS50015 |
|
Description
- This example shows the usage of the offered functionalities of the shield. It does the following:
Switches a channel ON
Reads current through the switch, battery voltage and performs diagnosis in ‘ON’ state
Switches the channel OFF
This is a single channel supporting shield and hence the default configurations for channels are set in the library.
BTS5001x-hss-single-ch
Summary
Basic High-side-switch example to operate single channel. Compatible with BTS50010 and BTS50015 variants.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS50010 |
|
Shield |
BTS50015 |
|
Description
This is a basic high-side-switch example that demonstrates how to switch on/off a specific channel. Along with channel operation, you could also determine the sensed current of the channel.
BTH500xx-hss-single-ch
Summary
Switches one switch of the shield at a time.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTH50015-1LUA, BTH50030-1LUA |
|
Description
This example demonstrates how you can switch on/off one switch at a time. There are two switches available on the board.
BTH500xx-hss-multiple-ch
Summary
Switches multiple switches at once.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTH50015-1LUA, BTH50030-1LUA |
|
Description
This example demonstrates how you can switch on/off multiple switches at once. There are two switches available on the board.
BTH500xx-hss-advanced
Summary
Shows the complete functionality of the shield.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTH50015-1LUA, BTH50030-1LUA |
|
Description
This example demonstrates how you can use the full feature set of the shield. It shows you how to use the diagnosis function, the temperature measurement (if NTC is populated), the output voltage measurement of switch 1 and the supply voltage measurement. The example is also measuring the current which is flowing through the switch and prints the value to the serial monitor.
BTS500xx-hss-single-ch
Summary
Switches one switch of the shield at a time.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS50010-1LUA, BTS50005-1LUA |
|
Description
This example demonstrates how you can switch on/off one switch at a time. There are two switches available on the board.
BTS500xx-hss-multiple-ch
Summary
Switches multiple switches at once.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS50010-1LUA, BTS50005-1LUA |
|
Description
This example demonstrates how you can switch on/off multiple switches at once. There are two switches available on the board.
BTS500xx-hss-advanced
Summary
Shows the complete functionality of the shield.
Compatibility
Type |
Variant |
Covered by |
---|---|---|
Shield |
BTS50010-1LUA, BTS50005-1LUA |
|
Description
This example demonstrates how you can use the full feature set of the shield. It shows you how to use the diagnosis function, the temperature measurement, the output voltage measurement of switch 1 and the supply voltage measurement. The example is also measuring the current which is flowing through the switch and prints the value to the serial monitor.