Skip to content

Commit f8f4c16

Browse files
committed
SAMD 1.7.7 release for Micromod variant typo, fixes master_reader.ino, adds VIM files to .gitignore
1 parent 78cdca4 commit f8f4c16

File tree

4 files changed

+67
-9
lines changed

4 files changed

+67
-9
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*~
2+
[._]*.un~
3+
*.swp

IDE_Board_Manager/package_sparkfun_index.json

+51
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,57 @@
16611661
{ "name": "Sparkfun Qwiic Micro" },
16621662
{ "name": "SparkFun SAMD51 MicroMod" }
16631663
],
1664+
"toolsDependencies": [
1665+
{
1666+
"packager": "arduino",
1667+
"name": "arm-none-eabi-gcc",
1668+
"version": "4.8.3-2014q1"
1669+
},
1670+
{
1671+
"packager": "arduino",
1672+
"name": "bossac",
1673+
"version": "1.8.0-48-gb176eee"
1674+
},
1675+
{
1676+
"packager": "arduino",
1677+
"name": "openocd",
1678+
"version": "0.9.0-arduino"
1679+
},
1680+
{
1681+
"packager": "arduino",
1682+
"name": "CMSIS",
1683+
"version": "4.5.0"
1684+
},
1685+
{
1686+
"packager": "arduino",
1687+
"name": "CMSIS-Atmel",
1688+
"version": "1.2.0"
1689+
}
1690+
]
1691+
},
1692+
{
1693+
"name": "SparkFun SAMD Boards (dependency: Arduino SAMD Boards 1.8.1)",
1694+
"architecture": "samd",
1695+
"version": "1.7.7",
1696+
"category": "Contributed",
1697+
"url": "https://github.com/sparkfun/Arduino_Boards/raw/master/IDE_Board_Manager/sparkfun-samd-1.7.7.tar.bz2",
1698+
"archiveFileName": "sparkfun-samd-1.7.7.tar.bz2",
1699+
"checksum": "SHA-256:2B5DD4726EAF42BEFC44F23ADCE18C4D40EB376E795839A20E130F1D6C3F543B",
1700+
"size": "2841070",
1701+
"help": {
1702+
"online": "https://learn.sparkfun.com/tutorials/installing-arduino-ide/board-add-ons-with-arduino-board-manager"
1703+
},
1704+
"boards": [
1705+
{ "name": "SparkFun SAMD21 Mini Breakout" },
1706+
{ "name": "SparkFun SAMD21 Dev Breakout" },
1707+
{ "name": "SparkFun 9DoF Razor IMU M0" },
1708+
{ "name": "LilyPad LilyMini" },
1709+
{ "name": "Sparkfun SAMD21 Pro RF" },
1710+
{ "name": "Sparkfun RedBoard Turbo" },
1711+
{ "name": "Sparkfun SAMD51 Thing Plus" },
1712+
{ "name": "Sparkfun Qwiic Micro" },
1713+
{ "name": "SparkFun SAMD51 MicroMod" }
1714+
],
16641715
"toolsDependencies": [
16651716
{
16661717
"packager": "arduino",
2.71 MB
Binary file not shown.

sparkfun/samd/libraries/Wire/examples/master_reader/master_reader.ino

+13-9
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,33 @@
66
// Refer to the "Wire Slave Sender" example for use with this
77

88
// Created 29 March 2006
9+
// Updated 22 October 2020
910

1011
// This example code is in the public domain.
1112

1213

1314
#include <Wire.h>
1415

16+
#define SEN_ADDR 0x69
17+
#define REG_REQUEST 0x14
18+
1519
void setup()
1620
{
17-
Wire.begin(); // join i2c bus (address optional for master)
18-
Serial.begin(9600); // start serial for output
21+
Wire.begin();
22+
Serial.begin(115200); // Start serial for output
1923
}
2024

2125
void loop()
2226
{
23-
Wire.beginTransmission(0x69);
24-
Wire.write(0x14);
25-
Wire.requestFrom(0x69, 1); // request 6 bytes from slave device #2
26-
Wire.endTransmission();
27+
Wire.beginTransmission(SEN_ADDR); // Begin at sensor's address
28+
Wire.write(REG_REQUEST); //Request information from specified register
29+
Wire.endTransmission();
2730

28-
while(Wire.available()) // slave may send less than requested
31+
Wire.requestFrom(SEN_ADDR, 2); // Expecting two bytes
32+
while(Wire.available()) // Sensor may send less than requested
2933
{
30-
uint8_t c = Wire.read(); // receive a byte as character
31-
Serial.println(c, HEX); // print the character
34+
uint8_t c = Wire.read(); // Read single byte
35+
Serial.println(c, HEX); // Print byte as a hex value
3236
}
3337

3438
delay(500);

0 commit comments

Comments
 (0)