Dia antes primera install

This commit is contained in:
2025-12-08 15:20:28 -06:00
commit 1416478c9c
4130 changed files with 886376 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
## Configuring I2C on the Intel Edison Arduino Base Board
I2C bus 6 is broken out to the header pins labeled SDA and SCL on the Intel
Edison Arduino base board. The
[edison-i2c-config](https://github.com/fivdi/edison-i2c-config)
package can be used to configure this I2C bus:
```js
const i2cConfig = require('edison-i2c-config');
i2cConfig((err) => {
if (err) {
console.log('Sorry, something went wrong configuring I2C bus 6 :(');
} else {
console.log('Hey!, I2C bus 6 is ready for usage :)');
console.log('Run "i2cdetect -y -r 6" to list the devices on bus 6');
}
});
```

80
node_modules/i2c-bus/doc/raspberry-pi-i2c.md generated vendored Normal file
View File

@@ -0,0 +1,80 @@
## Configuring I2C on the Raspberry Pi
This guide assumes that release 2015-01-31 or later of the Raspbian Operating
System is being used.
An I2C bus is broken out to pins 3 (SDA) and 5 (SCL) on the P1 header. The
number of steps that need to be performed to configure this I2C bus for usage
by user `pi` on Raspbian without root privileges is highly dependent in the
version of Raspbian being used.
### Configuring I2C with raspi-config
With Raspbian Jessie 2015-11-21 or later the complete configuration can be
performed with the `raspi-config` software configuration tool which can be run
from a terminal window as follows:
```
sudo raspi-config
```
In the `raspi-config` user interface navigate to `Interfacing Options >> I2C`
and answer the question `"Would you like the ARM I2C interface to be enabled?"`
with `<Yes>`. After the next reboot user `pi` will be able to use the I2C bus
without root privileges.
### Configuring I2C Manually
On older versions of Raspbian (prior to Raspbian Jessie 2015-11-21) the
`raspi-config` tool can still be used to configure the I2C bus, but additional
steps typically need to be performed.
#### Step 1 - Enable I2C
To enable I2C ensure that `/boot/config.txt` contains the following line:
```
dtparam=i2c_arm=on
```
#### Step 2 - Enable user space access to I2C
To enable userspace access to I2C ensure that `/etc/modules` contains the
following line:
```
i2c-dev
```
#### Step 3 - Setting the I2C baudrate
The default I2C baudrate is 100000. If required, this can be changed with the
`i2c_arm_baudrate` parameter. For example, to set the baudrate to 400000, add
the following line to `/boot/config.txt`:
```
dtparam=i2c_arm_baudrate=400000
```
#### Step 4 - I2C access without root privileges
If release 2015-05-05 or later of the Raspbian Operating System is being used,
this step can be skipped as user `pi` can access the I2C bus without root
privileges.
If an earlier release of the Raspbian Operating System is being used, create a
file called `99-i2c.rules` in directory `/etc/udev/rules.d` with the following
content:
```
SUBSYSTEM=="i2c-dev", MODE="0666"
```
This will give all users access to I2C and sudo need not be specified when
executing programs using i2c-bus. A more selective rule should be used if
required.
#### Step 5 - Reboot the Raspberry Pi
After performing the above steps, reboot the Raspberry Pi.

31
node_modules/i2c-bus/doc/raspberry-pi-software-i2c.md generated vendored Normal file
View File

@@ -0,0 +1,31 @@
## Configuring Software I2C on the Raspberry Pi
Raspbian has a software I2C driver that can be enabled by adding the following
line to `/boot/config.txt`:
```
dtoverlay=i2c-gpio,bus=3
```
This will create an I2C bus called `/dev/i2c-3`. SDA will be on GPIO23 and SCL
will be on GPIO24 which are pins 16 and 18 on the GPIO header respectively.
For further information about `i2c-gpio` and the parameters it supports see
`/boot/overlays/README` on the Raspberry Pi.
The advantage of software I2C over hardware I2C on the Raspberry Pi is that
software I2C supports I2C clock stretching. Hardware I2C doesn't support I2C
clock stretching due to a
[hardware bug](http://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.html).
Some devices like the BNO055 9-axis absolute orientation sensor rely on I2C
clock stretching and will not function correctly with hardware I2C on a
Raspberry Pi. Using software I2C to communicate with the BNO055 will resolve
this issue.
Another typical use case for software I2C is communication with AVR
microcontrollers, for example, the ATmega328P microcontroller on an Arduino
UNO. AVR microcontrollers are not particularly fast and it's relatively easy
to implement AVR code that relies on I2C clock stretching. Using software I2C
to communicate with the AVR will resolve I2C clock stretching issues.