Skip to content

Commit

Permalink
Fix MagTag + Use AnalogPin instead of Potentiometer
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Nov 27, 2023
1 parent 82e7024 commit 8472bf2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion boards/feather-esp32-v2/magic.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"name": "Battery ADC",
"pinName": "A35",
"type": "potentiometer",
"type": "analog_pin",
"mode": "ANALOG",
"direction": "INPUT",
"analogReadMode": "PIN_VOLTAGE",
Expand Down
2 changes: 1 addition & 1 deletion boards/feather-esp32/magic.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
"name": "Battery ADC",
"pinName": "A35",
"type": "potentiometer",
"type": "analog_pin",
"mode": "ANALOG",
"direction": "INPUT",
"analogReadMode": "PIN_VOLTAGE",
Expand Down
18 changes: 15 additions & 3 deletions boards/magtag/definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,21 @@
],
"analogPins":[
{
"name":"A0",
"name":"A17",
"displayName":"Piezo Speaker (A0)",
"hasPWM":true,
"dataType":"int16"
},
{
"name":"A1",
"displayName":"A1",
"name":"D10",
"displayName":"D10",
"dataType":"int16",
"hasPWM":true,
"hasServo":true
},
{
"name":"D18",
"displayName":"A1 (D18)",
"dataType":"int16",
"hasPWM":true,
"hasServo":true
Expand All @@ -87,6 +94,11 @@
"name":"A3",
"displayName":"Light Sensor (A3)",
"dataType":"int16"
},
{
"name":"A4",
"displayName":"Voltage Monitor (A4)",
"dataType":"int16"
}
],
"i2cPorts": [
Expand Down
17 changes: 17 additions & 0 deletions boards/magtag/magic.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@
"analogReadMode": "PIN_VALUE",
"period": 30,
"isPin": true
},
{
"name": "Enable Speaker",
"pinName": "D16",
"type": "mosfet_driver",
"mode": "DIGITAL",
"direction": "OUTPUT",
"isPin": true
},
{
"name": "Piezo Buzzer",
"pinName": "D17",
"type": "piezo_buzzer",
"pwmSetting": "variableFrequency",
"frequency": 146,
"resolution": 10,
"isPWM": true
}
]
}
2 changes: 1 addition & 1 deletion boards/mkrwifi1010/magic.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
"name": "Battery ADC",
"pinName": "A32",
"type": "potentiometer",
"type": "analog_pin",
"mode": "ANALOG",
"direction": "INPUT",
"analogReadMode": "PIN_VOLTAGE",
Expand Down

0 comments on commit 8472bf2

Please sign in to comment.