You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify which kind of ARM board you are using, e.g. RaspberryPi3, RaspberryPi1, BBB, etc...
Raspberry Pi 3 B+
Operating System
Which OS are you using? e.g. Ubuntu Mate 16.04, Raspbian, Armbian, etc...
Hypriot 1.9.0
Swift Version
Which Swift version are you using? Did you compile it yourself or did you use prebuilt binaries?
4.1.2 using pre-built binaries
Description
Describe your hardware setup (e.g. board connected to i2c sensor) and describe briefly the issue, specifying the steps needed to reproduce it, if necessary.
I have an LED on the breadboard with a resistor. The ground is connected to P6, the positive is connected to P4 on a Raspberry Pi 3 B+
I've got a project created that compiles. The code in main.swift is as follows:
let gpios = SwiftyGPIO.GPIOs(for: .RaspberryPi3)
var gp4 = gpios[.P4]!
Please list any error message you've receveived during execution.
When gp4 is declared like this:
var gp4 = GPIO(name: "P4", id: 4)
gp4.direction = .OUT
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /home/swift/GPIOTest/.build/checkouts/SwiftyGPIO.git-1189449763/Sources/SwiftyGPIO.swift, line 104
Current stack trace:
Illegal instruction (core dumped)
When gp4 is declared like this:
let gpios = SwiftyGPIO.GPIOs(for: .RaspberryPi3)
var gp4 = gpios[.P4]!
Fatal error: Can't open /dev/mem , use sudo!: file /home/swift/GPIOTest/.build/checkouts/SwiftyGPIO.git-1189449763/Sources/SwiftyGPIO.swift, line 353
Current stack trace:
Illegal instruction (core dumped)
The text was updated successfully, but these errors were encountered:
Hi Adrian, I've never tried Hypriot but it should work.
Where are you running this, directly in Hypriot or in a docker container (gpio tutorial for docker)?
Both samples require that you launch them with root privileges using sudo, and the first should work if /sys/class/gpio/export is available.
The second one should work too if they've imported the required kernel patches from Raspbian, but I'd say it's likely that they've done it.
Can you try again using sudo and maybe with Swift 4.1.3 for Raspbian?
uraimo
changed the title
Errors on Raspberry Pi 3 B+
[Hypriot] Errors on Raspberry Pi 3 B+
Dec 26, 2018
Board Type
Specify which kind of ARM board you are using, e.g. RaspberryPi3, RaspberryPi1, BBB, etc...
Raspberry Pi 3 B+
Operating System
Which OS are you using? e.g. Ubuntu Mate 16.04, Raspbian, Armbian, etc...
Hypriot 1.9.0
Swift Version
Which Swift version are you using? Did you compile it yourself or did you use prebuilt binaries?
4.1.2 using pre-built binaries
Description
Describe your hardware setup (e.g. board connected to i2c sensor) and describe briefly the issue, specifying the steps needed to reproduce it, if necessary.
I have an LED on the breadboard with a resistor. The ground is connected to P6, the positive is connected to P4 on a Raspberry Pi 3 B+
I've got a project created that compiles. The code in main.swift is as follows:
I also tried declaring
gp4
like this:Please list any error message you've receveived during execution.
When
gp4
is declared like this:When
gp4
is declared like this:The text was updated successfully, but these errors were encountered: