Jump to content

Arduino and Raspberry Pi Projects Thread


gavino200

Recommended Posts

2 minutes ago, chadbag said:

 

 

You might just be able to double click it or something in the GUI.  Don't know how the linux GUI things work with shell scripts.

 

That's what I expected. I really only have experience with Windows/Mac, mostly windows. I wasn't able to find an icon anywhere and I tried double clicking files. No luck. 

 

Actually this was is pretty simple. And if I have to use Bash script, there's no reason not to run the lite version of the OS (which seems only to have the terminal - no "desktop"). 

 

I'm happy with this for now. Next step will be to get it to run automatically on boot. Then redo the whole thing with the lite OS (maybe). Then connect it to the DR5000

 

Thanks so much Chad!!!!!

  • Like 1
Link to comment

I found some guidance on the beginners RasPi forum and now I have a menu item I just click on it to open iTrain. 

 

Now I just need to work out how to get it to run on boot up. A quick search shows lots of results, so this should be doable. 

 

image.thumb.png.0a6434fd722c5a4e6a2fd467f75b60db.png

Link to comment

I'm interested in trying this as a RasPi project. It's a guide to making your own VPN. It's described as a weekend project, but would undoubtedly take me about a month. I think I could probably do it, and I think the knowledge gained would help me with my train related network issues. 

 

There are many reasons to use a VPN but I have only one. I like to look at regionally restricted copyright material. Specifically I want to access Mexican Netflix from the US. I've tried to do this with multiple commercial VPNs. It hasn't been possible since 2016 when NF upped it's game seriously. Amazon too. They shut you down almost immediately. Also there aren't enough people who want to do this to make an attrition approach worth it for the companies. They do it for an outside in approach to the US but not for a low demand inside out use like US -> Mexico.

 

So I'll need to find out if this approach is likely to work for me. I probably need to learn how NF shut down the commercial VPNs and see if this approach has any advantage. If it does I'll try it. It should be sort of fun.

 

 

Link to comment

A small but important milestone today. I finally got my first "Non-arduino" to work and take a sketch from the Arduino IDE. This is an ESP32 Devkit C. As far as I understand it has a faster chip than an Arduino, more memory, and also has wifi. Full disclosure: I've been trying to get this thing to work for a couple of weeks! 🤣  It took a while for me to understand how the IDE filing system works. Also, some of the download files from the maker "Espressif" don't work until you install python!

 

I began to wonder it this was a dead board. But I was sure I hadn't done any of the things known to kill a board. And as this board is a genuine one from Espressif rather than a knockoff (that will be next - they're cheaper), I figured it was ok. Finally, the effort paid off. 

 

This is just a simple LED blink sketch. I also tested the wifi by having it scan my home network. I'll leave it at that for today. Next I'll try to get it to do something potentially model related. 

 

VKWgAnX.jpg?1

  • Like 2
Link to comment

I managed to use these instructions linked on Marc's Shin-Yukari blog to access the ESP32's internal filing system. It didn't work for me yesterday, so I tried it again today with success. This is step one of getting the ESP32 to display an image on a small OLED or TFT screen. I'll leave it there for today. Next up will be connecting the display to the ESP32 and preparing a test image. If this works I'll have a tiny screen ready to be included in a future modelling project. 🙂

 

Below you can see the serial monitor showing the contents of a text file that I placed in the ESP32's memory. The goal will be to place an image there and have it displayed on a tiny screen. 

 

image.thumb.png.28fbae0f4a4cee4138db80c2b2ba75b3.png

  • Like 1
Link to comment

I ordered a Pi system -- not for train stuff but for home automation.  However, I may play around with it with train stuff for a while since it is mostly for after our house is done. I got it now so I could figure out how it works and test it with a few cheap cameras I have but in general it won't be used until the house is done.

 

 

I may try and see if the Digikeijs admin apps will run under WINE.

 

  • Like 2
Link to comment

Awesome. Post your projects. I'd love to see them.

 

BTW there's an odd glitch with the Pi 4. If you use a VNC viewer to control your Pi remotely as a "headless" unit, you need to go into the "Sudo raspi-config" and change the screen resolution from default to something specific. If you don't it wont boot. It just gets confused trying to decide what resolution to choose for no screen. 

 

 

  • Like 2
Link to comment
6 hours ago, chadbag said:

not for train stuff but for home automation

I have an old Pi running OpenHAB (https://www.openhab.org/) for years. Great for home automation. Very stable. It’s also somehow connected to my layout. The Pi running the layout’s LEDs and sky lights is also able the dim the room’s light. That’s something that impressed my wife 😀.

  • Like 2
Link to comment
12 minutes ago, Madsing said:

I have an old Pi running OpenHAB (https://www.openhab.org/) for years. Great for home automation. Very stable. It’s also somehow connected to my layout. The Pi running the layout’s LEDs and sky lights is also able the dim the room’s light. That’s something that impressed my wife 😀.

 

Thanks for the pointer.  I'll be running Homebridge on it since my home automation is all HomeKit based, but OpenHAB looks interesting for oddball things that may not have HomeBridge adapters and it claims to interact with it.  I just took a quick look at it so am not sure of the particulars.

  • Like 2
Link to comment

Getting back to this after being sidetracked by a few home projects. This is the most success yet. I have my RasPi desktop on the tiny TFT screen. Now to work out how to get a video file onto this thing and play it. 

 

I also worked out how to make an image of the SD disk (the Pi hard drive) after setup. This way I don't have to go through the rigmarole of setting the Pi up again and again when I encounter problems. With the Pi Zero that's painfully slow, though from a modelling point of view the small size will more than make up for the slow speed. 

 

IZNyrV5.jpg

 

These are the GPIO pins to use.

 

hGlHLmo.png

 

Raspbian commands can be found in this page.

Edited by gavino200
  • Like 4
Link to comment

I fiddled with this again tonight. I still can't get the icons and fonts to a normal size but I I'm getting better at controlling the Pi with this giant font. I'm going to try to run an MP4 tomorrow if I get time.

 

j0WQgeI.jpg

  • Like 1
Link to comment

I had another little go at this today. I'm able to run a video loop on the small screen, but I can't get it to fill the screen, even though the VLC Media player on the Pi Zero is set to Full Screen. I think the set up is thoroughly confused with resolution and font sizes etc. Even though I've hit a wall, I think I'm actually quite close.

 

My plan to proceed is the following.

1. Switch to my regular Pi (Raspberry Pi 4). There's much more documentation online to cover it, and there'll be no annoying time delay.

2. Focus on the video first. Edit a suitable sample and get it working on a number of players to satisfaction in full screen mode using a monitor and also using VNC.

3. Work on connecting the Pi 4 to the small TFT screen. Solve the font size and resolution issues before proceeding.

4. Get the video to loop on the TFT screen using the Pi4.

5. Go back to a fresh Pi Zero install and try to replicate the above process on the Pi Zero.

 

m0BPH4f.jpg?1

Edited by gavino200
  • Like 4
Link to comment

Some progress today in a fairly short time. I got the VLC full screen to work by playing with the video settings. That was much easier to do with normal font size. Also, I'm using an app called "WinSCP" for loading files onto the Pi. It's like a VNC but for files. I can move files from my PC to the Pi by simple drag'n'drop.

 

My next step will be to get the TFT screen working, hooked up to the RasPi 4. This time I'm going to document all steps in the process well, so as to make it a reliably repeatable process.

 

FAZkxTc.jpg

Edited by gavino200
  • Like 2
Link to comment
Drunkenclam

Well. After way to long. This little project of mine is coming to an end. Its a ESP32 dev board connected to a 240x135 1.1in display. Its function is as a wifi clock I will mount on a building. If anyone want the code. I can send it. I know very basic code, which is why its taken me over a year due to lack of knowledge and time constraints. Put it this way. It took me all of last Sunday just to display the year vertically. When I'm sure someone could do it in less than 5 minutes. A mix of English and Japanese. I went for the school blackboard way of showing the date. Oh. I also added a temperature sensor. I was going to moumt it on the building roof and some details to make it look like a radio. But I think its a bit thick. Anyhow here's a video of it in action.

 

 

Edited by Drunkenclam
Spelling
  • Like 2
Link to comment

Very nice! It should be possible to detach the LCD panel from the PCB, so that it looks less thick. Have you tried that?

Marc 

  • Like 1
Link to comment
Drunkenclam

i should be able to seperate it with a sharp craft knife. Although haven't tried with this screen yet.

Link to comment

Yes. Be extra careful. You can also use a toothpick and roll it between the PCB and the display, or try dental floss. 

  • Like 2
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...