Orange Pi Zero setup, GPIO, UART (C/C++ and nodejs)
HTML-код
- Опубликовано: 21 авг 2024
- Orange Pi main site: www.orangepi.org
Armbian for Orange Pi: www.armbian.co...
Orange Pi Zero on Banggood: goo.gl/aZE9H1
etcher.io/
lucsmall.com/20...
github.com/zha...
stackoverflow....
stackoverflow....
www.npmjs.com/...
www.npmjs.com/...
www.iforce2d.ne...
This is what I love about this channel, more than just quads and planes rinse repeat. Very informative and refreshing. Thanks
Awesome video--thanks for posting it! I just ordered an OrangePi 2E board, so this video will be very helpful.
One small point on your "C++" code. It's C. You used gcc to compile it, even though the source files had .cpp extensions. So it's a trivial point, but if you put true object-oriented code in a .cpp file (or a .c file for that matter), then gcc won't know how to deal with it. So to be technically "correct," you could have either just used g++ to compile your code (and it would work if you later added OOP constructs), or just named the file(s) with a .c extension. Your code worked because you basically just wrote C code, and the WiringPi libraries are also in C, but if someone followed your examples and then added C++ code into their source at some point...it would fail.
Therefore I only mention this in case someone else has an issue down the road. I'm not trying to correct your video--overall, it's excellent and a huge help. So thanks again.
for someone like me, who has struggled for a year to understand all the steps to implement to exploit in C my card (orangePI pc), your tutorial is just wonderful. I finally could the puzzle reconstruct. Thank you
Thanks a lot for all the info! I recently did something similar with a OPi zero. It is very nice to connect a standard 3 dollar USB webcam and stream video or pictures across wifi. This makes an easy videodatalogger for all kinds of unattended processes in your house / garage. You can use Python or C and OpenCV to automatically interpret the video and take actions through GPIO.
I like your videos, it's almost exactly what I do day to day with IoT, It's easier to parse the data from the GPS if you use the parse for
thats built into the serialport library.
This video will help me a lot as I just received the same orangePi zero few days ago...Thank you very much!!!
2022 and yet a good instruction. Thanks 🇧🇷👍
Good info for beginners - picked up some handy tips myself.
If you can get a wee heatsink then pop it on the CPU, it'll help disperse a few DegC. There is an expansion module for the Orange Pi Zero too for +2 USB, IR & audio/video.
Watch out for the WiFi on board the OPi Zero. I have one and the chip they use on it is awful, with poor drivers and super dodgy wireless connections. If you plan to put this on the wheelchair rover, I would plug in an external WiFi card. I would use an ALFA USB wireless card. They have amazing plug and play support in Linux, You can put on a larger antenna such as a 9dBi one instead of the 5dBi they typically come with, and you can set the output transmit power to 1W (legal MAX). I would recommend the Alfa AWUSO36NH. Be careful for fakes though. These cards are pretty pricey at about $30 EACH, but they are the best that exist for the most part.
Love the video and the Channel!
Are you using Armbian?
Yes I'm using Armbian on all the OPi's I have. If you look on the Armbian page for the OPi Zero and scroll down a bit, you will see this:
"* Onboard wireless module (XR819) has poor software support so wireless connection issues are expected
* Onboard wireless module (XR819) is not supported on mainline releases"
The XR819 isn't a very good WiFi chip and even in just my home I can barely get 2 MBit(1/4 a Megabyte) connection out of it, with half the packets getting dropped. I would get the Alfa and upgrade to the mainline Kernel. Everything will work same as with Legacy, but OFC with security, stability, and memory upgrades. Mainline Armbian just doesn't support the Mali GPU which is fine, as you probably won't be using the VOUT.
yes, the wifi onboard isnt good, but ive had no problems at all otherwise it, armbian has working i2c and spi should be working too.
i had 4, i broke 2 because of mistakes, but the 2 that are left run very stable, for the 1.4 version of the board or newer the soc temp will display higher then it actually is
You can set up your router to always give your orange pi the same IP over DHCP.
Can also assign an IP number to a specific mac address. Router can do that. No hassle with the PI
Great video Scott. This video will be handy
thank you! it runs ok on my orange pi pc... merci beaucoup.
Excellent! Very comprehensive!!
What a wonderful post. Thank-you.
Not trying to be snarky, but the names (lol!) they give these microcontrollers. Right? Don't get me wrong, they're absolutely terrific! :*)
Thanks buddy, This helped me a lot
Im sure that you know this, and stated the reason somewhere in the vid. You can check the ip address of the pi from your router interface (same place as where you would change the wifi password), instead of going through and checking it from the usb terminal.
o shit i was right, the next 10 seconds after i posted that, you showed that exact method.
Hello, great to see OPi on your channel. I have spend long hours whit these ones.
You can add screen via TV out. It works kinda okey ;)
you could also use "nmtui" to activate wifi ;)
Also "armbian-config" is available
Putty can be compiled on a linux box as well. Great little app.
I'm enjoying OBS's layering your terminal on top of the green work mat. Kinda funny
I'm recording a section of my screen using ffmpeg
ruclips.net/video/pvyedg7Wd8E/видео.html
Howdy Chris, would you like a pair of Onion Omega boards? I have a pair here and I'm not likely to ever use them again, Matt
wow, realized they where headerless boards?
It has a TV out. CVBS. 640*480@16bpp. It can definitely be a desktop.
It also has SPI for all the amazing SPI LCDs out there.
While it has a TV-out, the TV-out is not supported by modern kernels. It only works with the legacy branch of Armbian (Linux 3.4.113 kernel, Debian Jessie), but not on the newer 4.14 kernels. To make matters worse, that old 3.4 kernel is incompatible with modern systemd, so you can't easily mix the old kernel with a modern distro. I did manage to get it up to Debian Stretch with the legacy kernel by removing systemd and going sysvinit, but it's rather fiddly. An attempt to go Debian testing failed, as the boot wouldn't go past network manager. Even when TV-out is running it's not all that great, as you don't have OpenGL or video acceleration from what I can tell.
Grumbel hmm. Well I see that it's "not supported" but it still does display on CVBS. There are other userland executables in order to hit the register settings for the rest of the issues that are "unsupported." I forget the GitHub for it, but it's pretty simple code.
Grumbel As for OpenGL and "Video acceleration" who cares? I'm talking about displaying a desktop... Not playing Crysis and watching highly compressed 4k videos. 😂🤣
Excellent wotk
excellent. just excellent!
There are ports of nmap on Windows, osx, *BSD, etc. Not just a Linux thing.
Another useful tool is arp-scan to find other machines on the network
Make sure you disable root ssh, a lot of distros enable it but it's lazy and insecure!
For the ip addressing, if your router supports it consider using static leases (that being where a mac/ip address pair are permanently associated), it's the best of both worlds.
I forgot to mention but I found that after doing that first init of the passwords, if you try to ssh as root there is no response whatsoever. So I think they have it covered.
Good good, though actually you should get a password prompt when trying as root, but you should just be denied :)
Yes, in all other systems I have used it does that. I guess the idea is that the attacker will remain unaware of whether root login is disabled or not - it gives them zero information.
Hi iforce2d, your video pretty is intriguing and educated, while l am happened be a member of Allwinner who designs SoC like H2+, H3 for the single-board computer, wondering whether you will be interested if we reach out to share more. Currently we are doing something fun on H3.
YES Please! Would be truly interresting to See some insight on it :-) especially how to use Sensors, read ds18b20 i2c temperature or interface to an a/d converter
Heh I know armbian developer great guy support it if you can... It is quite hard do support badly supported hardware. I had similar job so I know :) By the way red blink led usually connects to Linux heartbeat led trigger.
Beautiful project, I wanted to ask you if you could use Orange Pi Zero to manage the relays with Blynk
haha i love these! i even made videos about it before. cheap and fun!
while you're at node, give NodeRed.org a look. it's so much fun
Also if you're using Google Chrome a good SSH client is Secure Shell App - Offered by: Google Secure Shell Developers, it's very nice
Thanks for sharing :-)
For headless SBC's I use Advanced IP Scanner, is free, might be windows only... Ha I'm a Chris from NZ also, Auckland here.
Cool!!!
Could those grinding hault situations just be thermal throttling issues since they weren't repeatable during the video? Unfortunately the only way to tell would be to see if you can recreate those issues by redoing the process without the fan.
The grinding halt was only when trying to do a large compiling job, with or without the fan.
Orange Pi VS Raspberry Pi for programmable circuitry?
plz more... thx 4 vid
is it powered via MICROUSB 5v or OTG ?
i'm using the orange pi i96. Couldn't make it show up in IDE arduino serial port list. Plugging it into usb and usb otg right now.
I also heard that the i96 is a shitty one, should i just get another one? I intend to use it with my WN722n for wifi monitoring.
Can you make a tutorial for orange pi lite, please! I don't know how to use it!
Why not just use while(1)?
Why not just use for (;;)?
Because it looks ugly... I am quite sure it is common practice to use while(1) as an infinite loop. Even arduino loop() is defined as while(1).
It makes no difference in practice though and ugliness is subjective. To be honest I didn't even pay any attention to it when I copied it from the example: github.com/zhaolei/WiringOP/blob/h3/examples/blink.c
29:00. Real programmer returns 42 from a function, which has the infinite cycle. ;-)
Can you tell me how to make google assistant on this board, please
Dear Sir, can you make some more tutorials based on Orange Pi Zero and Python? Thanks
I know almost nothing about Python, apart from that the syntax enforcement pisses me off :)
For NZ I find aliexpress cheaper and more reliable to deal with, ie you get a refund a lot easier if it (rarely) goes bad.
Please do a tutorial to access GPIO in a console c++ (exe)
Orange Pi Zero h2 512mb, black screen problem and cpu heat
Please make more python tuts
Can i use it for my IoT project
HI. Has anybody found the cross reference for GPIO15 and 16? BTW I just found every else within wiringPi.h context. Thank you!
first result on google for "orange pi zero pinout" seems to cover it:
i.stack.imgur.com/O03j0.jpg
Or maybe you mean something else?
Thkx, for the wlan0 to work i had to fix one more thing
in the file => /etc/resolvconf/resolv.conf.d/base
domain home
search home telenet.be
nameserver 195.130.130.3
nameserver 195.130.131.3
nameserver 2a02:1800:100::43:2
nameserver 2a02:1800:100::43:1
and reboot
otherwise i cannot reach te WAN from my Orange Pi but only LAN.
Hi! Can I share this video on our social media account?
Yes, of course :)
@@iforce2d thanks a lot!
Is it powerful enough to compile avr gcc code in ubuntu?
That might be pushing it... I tried to compile something like that and it seemed to just get stuck halfway through. I think the 'power' it's lacking is memory, not really CPU power - if you can get one with lots of RAM it might help.
@@iforce2d I see.. how do you think about orange pi pc 2, do you have recommendation for it?
you can setup a full IOT system using Peter Scargill's "The Script", which knows what board you're using and make the needed mods to have a consistent setup everywhere... i collaborate with him to port the script on as many SBC as possible: tech.scargill.net/a-christmas-script/
all the stuff you used is installed in an unattended way, only few questions asked at the beginning, then you can go to do other stuff and when back the system will be up and running :)
Is it possible to use MAX485 on orange pi?
iirc that's an RS485 translator that uses UART input/output, so yes, it should be just like how the GPS was used.
Is possible install node red?
I don't know what that is, but a quick google search shows there is a RaspberryPI version. Seems quite likely it would run on this, but might need a few modifications.
I cant find the port? for arduino?
What port? I don't know what you mean.
i will not connect to ardunio? at all.
How about a super detailed Linux install on an old windows computer. 45 minutes long iforce2d style.
Mark Greco Um-hum! +1
For most linux desktop distros these days, installation is just a matter of clicking 'next' a few times and entering a name and password to use. If you want to just try Linux for a bit you don't even need to install it, you can just run it off a "live" disk which will boot up without changing anything on your hard drive. You can't really do much though because 'disk' space is limited to how much RAM your computer has (since it can't modify the actual hard drive) and if you run it from a CD when you turn the computer off nothing is saved (if using a USB stick you can save I think). But it's enough to get an idea of how it would run on your computer.
www.ubuntu.com/download/desktop
Actually I just tried this now and you don't even need to click next or set any passwords. Just choose "Try Ubuntu" (not install !!!) when it starts up.
iforce2d Ah-ha! A lot easier than it used to be. Thx! :*)
Mark, it ain't a big issue! Just use Etcher and a lightweight Distro (Xubuntu, AntiX, TinyLinux....etc.)
etcher.io or use free CD/DVD burner apps to burn ISO on CD/DVD, if USB boot never worked...etc.
antixlinux.com
Orange Pi Zero.... tech.scargill.net/the-orange-pi-zero/ - got "the script" running on it and just about everything works - ( would NOT recommend the WIFI but on an ethernet connector it is just fine - I seem to recall getting both I2c channels working - anyway, it's all in the blog.
So far the WiFi has been working fine. I gotta say it doesn't seem all that great for signal reception, at least just from looking at that wavemon utility it's down to about 30% through just 5-6 walls and about 25 meters or so. I don't know how that translates into actual usability/bandwidth though, will have to spend some more time doing practical usage.
Check ALIEXPRESS
Mac ? Get a PC
Mac? Don't recall mentioning that anywhere, but I think you can use the terminal on Mac to do most of this too.
iforce2d I don't like supporting apple, I call it the "don't repair just get a more expensive one because we need all your money and we will not repair you even easier think for under half a price of new one"
Just kidding but I don't really like apple.
I'm with you on that.
iforce2d DTW thanks, I have orange pi pc plus and I didn't even figure out how to get in gpio pins work. And now I can use your video. Thanks :)