@Miguel-Wisintainer That sounds like an issue with the library, not the omega. Why don't you modify an existing standalone library for the device then?
Posts made by Allison K
-
RE: OMEGA2 LIBUPM 0.7
-
RE: Bluetooth discoverability with iPhone
Blynk might work hypothetically for a wifi solution. (If phone can share data connection with omega when connected to the omega's network).
I'll ask around to see if I can borrow a bluetooth dongle to reproduce the issue you're seeing.
-
RE: Onion Omega2 Project Book - where are the sources
Also, the docs are on github, so if you found something you want to correct, you can fork the repo:
-
RE: OMEGA2 LIBUPM 0.7
@Miguel-Wisintainer said in OMEGA2 LIBUPM 0.7:
ADS1115
Onion hasn't written a specific library for this particular part but others have, so you can just change the I2C references to use the omega libraries.
-
RE: Onion Omega2 Project Book - where are the sources
@cas You might want to put in a help desk ticket to get an answer on this.
-
RE: Analog Pin
@Shailesh-verma You can use an analog to digital converter to read analog inputs
-
RE: Onion Omega2 doesn't keep new conf after reestart
@Juan-Marcelo-Arteaga Which config? Can you share the path(s)/contents of the file(s) affected?
-
RE: OMEGA2 LIBUPM 0.7
@Miguel-Wisintainer Not in particular. However, to compile on the omega, just follow this guide. If you can show which steps you took to compile, that would be helpful in giving you guidance.
I took a quick peek at the UPM libraries and apart from swapping out references to GPIO/SPI/I2C to use the onion libraries, you should be able to use them as far as I can tell. Another consideration might be only installing the libraries you need (due to space constraints on omega).
-
RE: connect Ultrasonic Sensor HC-SR04 using r-pi-usonic package
@Hemakumar-ellini Though I haven't got one of those sensors, there are plenty of implementations online with Arduino so I think it's gonna be a piece of cake for you to port that code to python (or leave it in C, as you like) and make a few changes to use onion's GPIO library. If I were you, I'd write the code to communicate with the sensor in C or Python and send the readings to my NodeJS code.
Docs for Omega GPIO : Python
Docs for using Omega GPIOsAnyways, sorry I can't be of more help. Hope this gives you some ideas to start off with!
-
RE: Trying to cross compile htop
@Paul-Beach I'm not quite sure what you're asking.
If you're asking how to execute those commands in the (running) docker container:
docker exec -it <container_name> sh
... would give you a shell and you can just type in your commands.
Here is the Docker guide - it's pretty useful.Though that's not really a question about the omega.
If you're saying you've compiled in the docker environment and you're asking "now what??", then :
- you can copy over the compiled files to the omega using scp
- I'd also like to note that you'd have to have created a docker image that is 32 bit for the compiled code to run on an omega
Alternatively, if you have an SD card, you can optionally compile your code right on the omega by installing gcc.
Anyhow, if you could clarify your question, I'd love to be helpful. Cheers !
-
RE: Bluetooth discoverability with iPhone
Hello! cool project you're working on there.
Sadly, I think it is complicated to pair bluetooth devices with Apple products. Here are their guidelines. I agree though, they are pretty vague about which class to set.
If you have the specs for your BT dongle you can check if your device profile is supported.I used to work on IoT devices that required BT and pairing was always the most difficult to get right. If you're willing to share your code, others might be able to reproduce your issue and help you debug it.
-
RE: Cloud compile down? (Omega 2+)
Update two weeks later: Still queued. Is cloud compile no longer available?
Onion Blog: Cloud compile
Post about problems with Cloud Compile in Feb 2017 -
SPI : changing CS pin
Has anyone succeeded in changing the pins used for SPI from the default (MISO = 9; MOSI = 8; CLK = 7; CS1 = 6). I'm mainly interested in changing the CS1 pin setting. I have multiple SPI devices and I want to disable/enable to select one at a time.
The SPI devices I am using are active-low enable. I am using an Omega 2+.
Here's the setup code I'm using (python):
# GPIO.output(pinNumber=6, setting=GPIO.HIGH) # GPIO.output(pinNumber=18, setting=GPIO.LOW) ... LSBFIRST = 1 busNumber = 1 deviceId = 32766 ... self.device = onionSpi.OnionSpi(busNumber, deviceId) ... spi.sck = 7 spi.mosi = 8 spi.miso = 9 spi.cs = 18 # spi.noCs = 1 # spi.csHigh = self.csHigh self.set_bit_order(LSBFIRST) # check the device if spi.checkDevice() is 0: mapped = "the device adapter is already mapped." else: mapped = "the device adapter is NOT mapped." print("Registered: {}".format(mapped)) # register the device if spi.registerDevice() is 0: success = "Device with the specified bus number and device ID is already registered OR successfully registered SPI device adapter." else: success = "Unable to register device." print("Registering.. : {}".format(success)) # initialize the device parameters if spi.setupDevice() is 0: success = "Setup successful." else: success = "Setup failed." print("Setting up spi device: {}".format(success)) # check the device again if spi.checkDevice() is 0: mapped = "the device adapter is already mapped." else: mapped = "the device adapter is NOT mapped." print("Registered: {}".format(mapped)) ### Here I print out all the parameters of the OnionSpi object
What I am seeing:
- pin6 is always high (though the SPI device is read fine using the above setup code).
- when manually changing GPIO value using something like the commented code at top : GPIO 18 switches low-to-high or high-to-low correctly, but when setting pin 18 as CS pin, nothing happens (no value change, ever). [the manual change of pin18 in conjunction with the noCS option commented out in above code]
- Setting the csHigh value to one (in commented code) doesn't seem to have any effect whether cs pin is set to 6 or 18
- I have confirmed that the SPI variables regurgitated after registration match the changes (pin 18 set to cs). See below.
Registered: the device adapter is already mapped. > SPI device already available Registering.. : Device with the specified bus number and device ID is already registered OR successfully registered SPI device adapter. > Initializing SPI parameters... > Set SPI mode: 0x508 > Set bits per word: 0 > Set max speed: 100000 Hz (100 KHz) Setting up spi device: Setup successful. Registered: the device adapter is already mapped. ---------------- SPI Device Settings: bus: 1 device: 32766 speed: 100000 Hz (100 kHz) delay: 0 us bpw: 8 mode: 0 (0x08) 3wire: 0 lsb: 1 loop: 0 no-cs: 0 cs-high: 0 GPIO Settings: sck: 7 mosi: 8 miso: 9 cs: 18 ----------------
Any hints on how to debug this would be greatly appreciated. Thanks!
Related links:
Communicating with SPI devices
SPI Python module -
RE: [Resolved] Omega 2+, python3 and spi-gpio-driver
Resolved this by:
- Cloned library to omega
- Installed gcc
- Compiled the spi-gpio-driver using makefile (only changed refs to python to python3)
- Copied relevant .so file (from lib/...) to /usr/lib/python3.6
- Program runs !
Not the .ipkg I had hoped for but it'll work for now.
-
RE: Default configuration
alzeih compiled a list here.
I recommend taking a look at this thread.
This project might interest you.
AFAIK Onion hasn't released a .config file for the default firmware. But if someone finds that, I too would be interested.
-
RE: Expansion docks keep getting fried
Hello,
The best way to get an answer on this might be a help desk ticket:
https://onion.freshdesk.com/support/tickets/newSorry for your dead docks
-
RE: ssh-agent: not found
AFAIK, the Omega uses dropbear ssh.
How to add public key for when you want omega to recognize the machine with which you log into it (and avoid typing in your credentials every time you ssh).
How to generate an ssh key on the omega:
mkdir ~/.ssh dropbearkey -t rsa -f ~/.ssh/id_rsa dropbearkey -y -f ~/.ssh/id_rsa | sed -n 2p > ~/.ssh/id_rsa.pub
... this is useful if you'd like to authorize the onion's access to a repository for instance (by sharing the .pub file).
<Note : I've only tested the above on the omega 2+.>
-
RE: Custom Firmware based of Omega
Here are a couple relevant guides:
OpenWRT build guide
Onion Cross-Compile guideTo see the list of packages installed on the omega :
opkg list
Can you share the errors/output you are seeing?
-
Cloud compile down? (Omega 2+)
Using cloud compile with a simple Hello World C++ program. Seems stuck at "queued".
Has anyone else come across this issue?
Any ideas? -
RE: Cross compile specific binary
Hey, I know it's been a while since you posted, but have you had any success cross-compiling individual packages?
In case you're still needing the steps:
Cross-compile Instructions : Step 6b.
OpenWRT build guide : Building single Packages.