-
Notifications
You must be signed in to change notification settings - Fork 28
Detect if I2C is enable and possibly enable it if user agrees #40
Comments
It would certainly be beneficial to have a PowerShell way of enabling I2C (and, as extension, other interfaces). |
We should also make sure these aren't pi specific (Or write them in an easy way to support other devices) since we do eventually want to support other devices. |
@anmenaga I understand your point, although the idea was not to "prevent" the user from using the module, but to warn/alert him that I2C (or other interface) was not enabled. Although this could become annoying if the user frequently import this module but don't care about this interface (maybe this is what you mean). Don't know if this could be solved with a flag on the Import-Module (don't know if it's even possible, but doesn't really makes sense). The call as you referred would make sense in that way. @tylerl0706 I'm not familiar with the other devices, but isn't this something specific for each device? Seems like it's a configuration that can vary from device do device (worst case, from OS to OS) |
We can start with Pi specific commands :) |
For what I've seen, enable the I2C "manually" seems quite easy, only requiring to edit:
/etc/modules
file to addi2c-dev
/boot/config.txt
file and uncomment thedtparam=i2c_arm=on
entry.If this is all that it takes, when the user imports this module, we can check if the i2c is already enabled and display a warning if it's not. Even better would be to prompt the user if he wants to enable it (avoiding the process of running
sudo raspi-config
and search for that).Does this seems feasible/ make sense?
The text was updated successfully, but these errors were encountered: