Jump to content

Hello world POWER_LED on orange pi lite


Berat Uslu

Recommended Posts

Hello guys,

 

I am trying to blinking POWER_LED on my orange pi lite using google firebase but I couldn't find any resources on internet.... 

 

Here is my armbian info;

http://sprunge.us/RhTM

I want to develop ioT application using orange pi zero coz it has internal ethernet and wifi connection options and it is cheap. 

 

What I want to learn is: 

 

- I want to develop my ioT application using python 

- which version OS I should load

- proper GPIO or related library for controlling GPIOs and rs-485 and i2c communications

 

Thanks.

Link to comment
Share on other sites

On 30.11.2017 at 3:59 PM, Berat Uslu said:

I want to develop ioT application using orange pi zero coz it has internal ethernet and wifi connection options and it is cheap. 

Quote

Known issues

  • Onboard wireless module (XR819) has poor software support so wireless connection issues are expected
 

 

 

 

On 30.11.2017 at 3:59 PM, Berat Uslu said:

- proper GPIO or related library for controlling GPIOs and rs-485 and i2c communications

https://github.com/chwe17/pyGPIO/ still in testing phase, but should work (except RS-485)

Link to comment
Share on other sites

5 minutes ago, martinayotte said:

RS485 has nothing to do with GPIOs, except if you do software serial bitbanging...

The easiest way to get a RS485 bus on any SoC boards is to use USB-RS485 dongle such those :

https://www.ebay.ca/itm/CH340G-Chip-USB-to-RS485-485-Converter-Adapter-For-Win7-Linux-XP-Vista-top-M94/351494358967

 

I want to communicate arduinos using max485 module... is it possibble? at the same time I have to use i2c. I would like to do this using orange pi zero.. is it possibble?

Link to comment
Share on other sites

21 minutes ago, Berat Uslu said:

I want to communicate arduinos using max485 module... is it possibble?

Of course, it is possible ... But, again, RS485 itself has nothing to do with GPIOs ...

With MAX485 module, you need to manage DE/RE signals by yourself with some GPIOs, with USB-RS485, it handling that itself, this is why I said the USB dongle is the easiest way !

 

Link to comment
Share on other sites

1 minute ago, martinayotte said:

Of course, it is possible ... But, again, RS485 itself has nothing to do with GPIOs ...

With MAX485 module, you need to manage DE/RE signals by yourself with some GPIOs, with USB-RS485, it handling that itself, this is why I said the USB dongle is the easiest way !

 

So I had decided to go with Rasp pi zero but. they are selling it very expensive on the other hand orange pi development side looks weak..  at the and I had to re-consider orange pi... i think it will be orange pi zero.. can you help me to build this project? coz there is no much resource on internet...

Link to comment
Share on other sites

1 hour ago, martinayotte said:

I don't see where is the challenge here since OPiZero has USB available on the expansion head, so you only need a USB breakout connector along with USB-RS485 dongle, hits means a total of less than US$1.50.

 

I am newbie on SoC boards. Challenge is, really I don't know how to start coding.  lets assume I will use USB-RS485 dongle and usb breakout connector.

Can you please provide me code example for:
- RS485 communication
- i2c communication
- Basic GPIO led example 

for all of this list items, code example and libraries.  at least you can give me a starting point. I will be appreciated.

Link to comment
Share on other sites

For RS485 using USB Dongle, the port simply appears as /dev/ttyUSB0 and you can use python serial to access it.

import serial

port = serial.Serial("/dev/ttyUSB0", 115200, timeout=1)
port.write("Hello World");
port.close()

For I2C and GPIO, I suggest to look at this library : https://github.com/duxingkei33/orangepi_PC_gpio_pyH3

 

Link to comment
Share on other sites

5 minutes ago, martinayotte said:

For RS485 using USB Dongle, the port simply appears as /dev/ttyUSB0 and you can use python serial to access it.


import serial

port = serial.Serial("/dev/ttyUSB0", 115200, timeout=1)
port.write("Hello World");
port.close()

For I2C and GPIO, I suggest to look at this library : https://github.com/duxingkei33/orangepi_PC_gpio_pyH3

 

ok I will try to get examples work. thank you very much. Can I ask additional questions when I need?

Link to comment
Share on other sites

10 minutes ago, martinayotte said:

For RS485 using USB Dongle, the port simply appears as /dev/ttyUSB0 and you can use python serial to access it.


import serial

port = serial.Serial("/dev/ttyUSB0", 115200, timeout=1)
port.write("Hello World");
port.close()

For I2C and GPIO, I suggest to look at this library : https://github.com/duxingkei33/orangepi_PC_gpio_pyH3

 

orangepi_PC_gpio_pyH3 library says it is "ALLwinner H3 base" but OPI zero H2 will it work?

Link to comment
Share on other sites

1 hour ago, Berat Uslu said:

orangepi_PC_gpio_pyH3 library says it is "ALLwinner H3 base" but OPI zero H2 will it work?

doesn't matter for your use case but  pinmapping of OPi PC and OPi 0 is different. There's a version of the same lib for the OPi0 somewhere on github (forgot the link).  You can use pyGPIO which is more or less the same lib (naming of the used pins differs a little bit, but OPi0 is supported). 

2 hours ago, Berat Uslu said:

Can you please provide me code example for:
- RS485 communication
- i2c communication
- Basic GPIO led example 

I suggest you go through the basic examples of the libs you use to improve your python skills a little bit. Otherwise, you'll need support everytime something doesn't work 'out of the box'. 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines