Learning Orange Pi Zero 2 and sensors
Budget: $30 – $250 USD
Hello,
As maybe you know nowadays to find a Raspberri Pi 4B is almost impossible or you have to pay the double or even more. So my solution was to find a cheaper product, more compact and with some similarities where the selected was the Orange Pi Zero 2, but it doesn't have the same support that has the raspberry in terms of examples and even codes online. And remember not the libraries that works for Raspberry works for Orange Pi zero 2. So are not accepted any codes that works in other products, only for the Orange Pi zero 2.
So, as this Orange doesn't have too many gpios I found one from Diodes incorporated (PI4IOE5V96248) that can get me up to 48 gpios using I2C, where later I found a quickly board from Mikroe that has already implemented everything that I need in terms of connections and I just need to connect the I2C cables, INT, Reset to the Orange Pi zero 2. This named Expand 13 of Mikroe.
So I have tried to make the programs for reading and writing in the gpios but has not been as I expected, then that is why I am here in freelancer opening a project.
What do I need:
1- A code like a library for the PI4IOE5V96248,, let's named PI4IOE5V96248.h where from the main code I can use any of the 48 GPIOs as was another normal port of the Orange Pi Zero 2.
2 -For testing your work, what we can do is that you give me the library .h and later also a program code where by terminal in case for writing it ask for the gpio to set high or low and respectively for instance if I have leds I can connect and see if after requiring high, then led should be on in the respective gpio selected and viceversa.
For reading, more or less the same, I can connect a push button where its normal status is high and when is pressed it goes low. so,, in this case after execute the program in the terminal it shows which push button was pressed according where the mini push button was connected.
And finally other program where for respective button that I press then one led in other gpio turns on and viceversa, for isntance if I have 4 buttons and 3 leds, then 1 button to switch on all the leds, 1 button for switching led 1, second button for swtich led 2, etc..
I have tried and the maximum that I got with my phyton code is that of the 48 gpios, just 40 gpios get the led working ok, and for the button the program starts telling that the buttons where pressed when not, and when i press only 3 of 4 buttons works. and I have not been able to get that one button switch on one led. After selecting the freelance I can share the codes and terminal results if that is helpful for you, but my skills in programming are not the best, better if you do it from scratch.
System installed Armbian for orangepizero 2 bullseye 4.9.
And next the info that I got for the gpio expander
bus = smbus.SMBus(3)
slave_address = 0x20
I access to this Orange by Ip address using Putty, and I upload the .py files by filezilla.
If this goes ok, then we can continue in other projects and new budgets as later in other project will be needed to test the uart connection, how it communicates with the MAX485 as related with the modbus communication, and more advanced projects. But let's start from the the base that is to control the GPIOs.
So if you are interested in this project and future ones, please let me know your experience in programming in python, hardware like the raspberry and if you are capable not only for this project but for the future ones.
Thanks
Luis
As maybe you know nowadays to find a Raspberri Pi 4B is almost impossible or you have to pay the double or even more. So my solution was to find a cheaper product, more compact and with some similarities where the selected was the Orange Pi Zero 2, but it doesn't have the same support that has the raspberry in terms of examples and even codes online. And remember not the libraries that works for Raspberry works for Orange Pi zero 2. So are not accepted any codes that works in other products, only for the Orange Pi zero 2.
So, as this Orange doesn't have too many gpios I found one from Diodes incorporated (PI4IOE5V96248) that can get me up to 48 gpios using I2C, where later I found a quickly board from Mikroe that has already implemented everything that I need in terms of connections and I just need to connect the I2C cables, INT, Reset to the Orange Pi zero 2. This named Expand 13 of Mikroe.
So I have tried to make the programs for reading and writing in the gpios but has not been as I expected, then that is why I am here in freelancer opening a project.
What do I need:
1- A code like a library for the PI4IOE5V96248,, let's named PI4IOE5V96248.h where from the main code I can use any of the 48 GPIOs as was another normal port of the Orange Pi Zero 2.
2 -For testing your work, what we can do is that you give me the library .h and later also a program code where by terminal in case for writing it ask for the gpio to set high or low and respectively for instance if I have leds I can connect and see if after requiring high, then led should be on in the respective gpio selected and viceversa.
For reading, more or less the same, I can connect a push button where its normal status is high and when is pressed it goes low. so,, in this case after execute the program in the terminal it shows which push button was pressed according where the mini push button was connected.
And finally other program where for respective button that I press then one led in other gpio turns on and viceversa, for isntance if I have 4 buttons and 3 leds, then 1 button to switch on all the leds, 1 button for switching led 1, second button for swtich led 2, etc..
I have tried and the maximum that I got with my phyton code is that of the 48 gpios, just 40 gpios get the led working ok, and for the button the program starts telling that the buttons where pressed when not, and when i press only 3 of 4 buttons works. and I have not been able to get that one button switch on one led. After selecting the freelance I can share the codes and terminal results if that is helpful for you, but my skills in programming are not the best, better if you do it from scratch.
System installed Armbian for orangepizero 2 bullseye 4.9.
And next the info that I got for the gpio expander
bus = smbus.SMBus(3)
slave_address = 0x20
I access to this Orange by Ip address using Putty, and I upload the .py files by filezilla.
If this goes ok, then we can continue in other projects and new budgets as later in other project will be needed to test the uart connection, how it communicates with the MAX485 as related with the modbus communication, and more advanced projects. But let's start from the the base that is to control the GPIOs.
So if you are interested in this project and future ones, please let me know your experience in programming in python, hardware like the raspberry and if you are capable not only for this project but for the future ones.
Thanks
Luis