Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to eyeball08,Wondergirly,bofh,johnstevens77,Bhoddhisatva, for Donating to support the site

Raspberry Pi Project

Seek assistance with all types of tech. - computer, phone, TV, heating controls etc.
GeoffF100
Lemon Quarter
Posts: 4745
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Raspberry Pi Project

#345998

Postby GeoffF100 » October 7th, 2020, 7:54 pm

I am about to take the plunge with my first Raspberry Pi project. I would appreciate guidance from the experienced Pi men on this board.

I wrote a Python interface for the Novag Citrine chess computer four years ago. It stopped working when the Python chess library had changed. I have fixed that, and all is well on my third generation i3 running Xubuntu. The CPU usage looks negligible in the Xfce task manager. The program should work on a Raspberry Pi Zero W. I am currently using a physical serial port, but I used a USB serial port adapter previously.

Here is a list of the basic parts for the project:

https://subscription.packtpub.com/book/ ... p-computer

I already have mobile phone chargers, notably an iPad 2 charger, which delivers just over 2A. I also have a USB hub, which incorporates an SD card reader/writer. I have got an HDMI monitor that is on my Windows machine, so it is mostly idle. I can also temporarily deploy the keyboard and mouse from that machine. That leaves:

Raspberry Pi Zero W £9.80:

https://thepihut.com/products/raspberry-pi-zero-w

Mini-HDMI to HDMI cable £2.40:

https://thepihut.com/products/official- ... hdmi-cable

USB to micro USB OTG connector £2.00:

https://thepihut.com/products/usb-to-mi ... erter-shim

Case £3:

https://thepihut.com/products/premium-r ... -zero-case

(All plus £2.99 postage.)

Micro SD card £7.99:

https://www.currys.co.uk/gbuk/cameras-a ... 6-pdt.html

(Free delivery.)

That appears to be enough to get me going.

I would like to use my Android phone or, better still, my old iPad 2 as a display. Here is an article that makes it look easy:

https://www.makeuseof.com/tag/android-t ... pberry-pi/

My new Nokia 5.3 should work with RDP, but the iPad 2 running IOS 9 will not. VNC looks more promising. Here are some more detailed instructions for connecting to an iPad:

https://www.instructables.com/How-to-Us ... spberry-P/

The ideal solution may be to use the Pi to create a WiFi hot spot for the iPad, but that looks more problematic:

https://www.raspberrypi.org/blog/connec ... -ipad-pro/

What have I missed? Controlling the Pi from the iPad my prove to be difficult, so I may want a more convenient input device. I might get away with a couple of push buttons, but then I would need GPIO. A camera might also be useful for future projects, but that probably is not compatible with the cheap case.

Here is an awesome chess project that I do not expect to emulate:

https://www.raspberrypi.org/blog/connec ... -ipad-pro/

GrahamPlatt
Lemon Quarter
Posts: 2077
Joined: November 4th, 2016, 9:40 am
Has thanked: 1039 times
Been thanked: 840 times

Re: Raspberry Pi Project

#346018

Postby GrahamPlatt » October 7th, 2020, 9:21 pm

Your last link isn’t what I expected.

GeoffF100
Lemon Quarter
Posts: 4745
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: Raspberry Pi Project

#346019

Postby GeoffF100 » October 7th, 2020, 9:24 pm

Sorry. Here is the correct link:

http://www.raspberryturk.com/

GeoffF100
Lemon Quarter
Posts: 4745
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: Raspberry Pi Project

#346105

Postby GeoffF100 » October 8th, 2020, 10:27 am

It looks as though the best approach is to set up a web server on the Pi, so that I can control to Novag interface from a browser on my Android phone. The iPad should work too, but is very slow on the web. Flask looks appears to be an appropriate tool for setting up the web server. I can generate an svg string for the current board position. Apart from that, I just have a start/stop engine button and a pull-down to choose the engine and difficulty.

GeoffF100
Lemon Quarter
Posts: 4745
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: Raspberry Pi Project

#346373

Postby GeoffF100 » October 9th, 2020, 9:10 am

I have ordered the hardware. The Pi Zero is ridiculously cheap. I was wise to write the order down and come back to it later. My mobile phone cable is USB-C. I need micro-USB. Another £1.50. That will not break the bank. It would have been a pain to have to pay the postage a second time though.

The awesome Raspberry Turk is out of my league. A simpler project would be to mount a Pi Zero camera in the bottom of a cardboard moving box:

https://www.diy.com/departments/cardboa ... 419_BQ.prd

I could then stick a cheap vinyl chess board on the top:

https://www.chess4schools.co.uk/product ... ff-20-inch

The border would overhang the edge a little, but that does not matter. The final trick is to drill a hole in the middle of each square. Light is blocked if there is a piece on the square, and passes through if there is not. The image processing should be pretty simple for that.

The Novag Citrine board is better however. It has magnetic pieces with reed switches under the squares and an LED on each square to indicate the move. The Raspberry version could get away with eight LEDs to indicate the row and eight LEDs to indicate the column. The Novag Constellation used to work like that.

GeoffF100
Lemon Quarter
Posts: 4745
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: Raspberry Pi Project

#348772

Postby GeoffF100 » October 18th, 2020, 8:23 pm

I have now got the Raspberry Pi Zero W with the associated accessories and set it up. I had a misadventure with the micro-SD card. I put it in before fitting the board in the case and broke it. It has to go in afterwards with my case. I had to wait for a replacement to be delivered. (My case does have a slot for connecting to a camera, by the way.)

I am impressed with the Pi. The Raspberry Pi Foundation has done a fine job. The Zero is slow, and desperately slow when asked to do something too ambitious. Nonetheless, there is a lot that it will do at a reasonable speed. What do you expect for £9?

SSH and SCP worked fine, but SSH with X forwarding did not work properly for me. I set up VNC Viewer on an old iPad 2, and it worked like a dream for clicking buttons and selecting menu options. I could not see how to bring up a keyboard though. Fortunately, I do not need that to run my application. I had no problems with my old USB serial port adapter.

iwconfig shows the Raspberry Pi Zero W's WiFi Link Quality as 25/100 with plenty of excessive retries in the next room, which does not look good. It seems to work though. My old (and outrageously small) TP-LINK TL-WN725N shows a Link Quality of 100/100. I have not tried using the Pi to set up a WiFi hotspot, but there are plenty of tutorials for that.

GeoffF100
Lemon Quarter
Posts: 4745
Joined: November 14th, 2016, 7:33 pm
Has thanked: 178 times
Been thanked: 1372 times

Re: Raspberry Pi Project

#349016

Postby GeoffF100 » October 19th, 2020, 6:50 pm

VNC Viewer has three dots up on the top right. Tapping them opens a palette with the option to bring up an on-screen keyboard.


Return to “Technology - Computers, TV, Phones etc.”

Who is online

Users browsing this forum: No registered users and 28 guests