Go to advanced search

by Memotech Bill
Fri Nov 20, 2020 9:40 pm
Forum: Off topic discussion
Topic: BBC's Dr Who goes RISC-V to teach computing
Replies: 32
Views: 1819

Re: BBC's Dr Who goes RISC-V to teach computing

I don't think it's quite simple enough though, the beauty of the BBC micro was its outstanding BASIC interpreter, flick a switch, beep-beep and off you go! Python's great, but more complicated with all the libraries and whatnot. Maybe they could make a schools OS image that boots straight into a Py...
by Memotech Bill
Mon Oct 26, 2020 5:37 pm
Forum: Off topic discussion
Topic: Kind of hard to do with a Pi...
Replies: 148
Views: 9384

Re: Kind of hard to do with a Pi...

One suggestion I have not seen is to standardise the batteries and make them easily swapable. Then when you are running low you pull in to a service station, swap out your old battery for a fully charged one. Probably just as quick as filling up with liquid fuel. The batteries would probably have a ...
by Memotech Bill
Sun Oct 25, 2020 10:16 am
Forum: Off topic discussion
Topic: Kind of hard to do with a Pi...
Replies: 148
Views: 9384

Re: Kind of hard to do with a Pi...

The problem is how is the consumer supposed to know. Price is no guarantee of quality. At least now there are internet review sites. But even then, by the time a product has lasted long enough to assess reliability, it has been replaced by an "improved" model. What is needed is some financ...
by Memotech Bill
Sun Jul 05, 2020 9:56 am
Forum: Advanced users
Topic: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED
Replies: 4
Views: 517

Re: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED

The equivalent code is there: void WriteConfig (const char *psPath, const char *psValue) { strcpy (&sRoot[nRootLen], psPath); diag_message (DIAG_USB, "%s = %s\n", sRoot, psValue); int fd = open (sRoot, O_WRONLY); if ( fd < 0 ) diag_message (DIAG_SYSERR, "Error opening gadget confi...
by Memotech Bill
Thu Jul 02, 2020 6:57 pm
Forum: Automation, sensing and robotics
Topic: Unidirectional logic shifting (3V3 to 1V8) with minimum components?
Replies: 10
Views: 913

Re: Unidirectional logic shifting (3V3 to 1V8) with minimum components?

One NPN transistor & one resistor (suggest 10K).
  • Connect together RPi 0v, Device 0v and transistor emitter.
  • Connect transistor collector to 1.8V point to be pulled down.
  • Connect base of transistor to one end of resistor.
  • Connect the other end of the resistor to a GPIO output.
by Memotech Bill
Thu Jun 25, 2020 8:59 am
Forum: Off topic discussion
Topic: Dreaming about the future ....
Replies: 70
Views: 5829

Re: Dreaming about the future ....

CDC machines with 60-bit words. I worked on one of those in my university days.

They also used 6-bit characters, so each word could store 10 characters. However to make that work, lower case characters had to use an escape code, making them 12-bit.

https://en.wikipedia.org/wiki/CDC_display_code
by Memotech Bill
Sun Jun 21, 2020 10:57 am
Forum: Off topic discussion
Topic: Animal question
Replies: 21
Views: 2718

Re: Animal question

Heater wrote:
Sat Jun 20, 2020 3:02 pm
So Pi as a virus it is.
A mind-altering virus that increases the likelihood of infection by subsequent strains.

Mk1 B -> A -> B+ -> 2B -> Zero -> 4B -> ZeroW
by Memotech Bill
Sun Jun 21, 2020 8:36 am
Forum: Beginners
Topic: Accessing Partition
Replies: 2
Views: 200

Re: Accessing Partition

How did you install the RaspberryPi OS on the SD card?

It is quite likely that the installation process wiped the partitions you had initially created.
by Memotech Bill
Sat Jun 20, 2020 8:12 am
Forum: Automation, sensing and robotics
Topic: Solved: Creating keyboard status lights
Replies: 4
Views: 425

Re: Creating keyboard status lights

man 4 console_ioctl

Or read /dev/input/eventX
by Memotech Bill
Sat Jun 20, 2020 7:21 am
Forum: Beginners
Topic: Editing a code to improve usability
Replies: 4
Views: 316

Re: Editing a code to improve usability

I have not examined the project in detail, only quickly looked at the files you referenced. From the way it is written, I would expect that the routine validate_alarm_call_in() in callup.py is used when the application is run. It should be noted that the routine will return when a matching sequence ...
by Memotech Bill
Fri Jun 19, 2020 6:54 am
Forum: Beginners
Topic: Editing a code to improve usability
Replies: 4
Views: 316

Re: Editing a code to improve usability

In file callup.py, change line 74 to:

Code: Select all

number = '0000000000'
The routine validate_alarm_call_in() repeatedly drops the first digit of this string, and adds a new digit to the end. So the variable number always remains the length it is initialised at.
by Memotech Bill
Wed Jun 17, 2020 12:27 pm
Forum: Advanced users
Topic: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED
Replies: 4
Views: 517

Re: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED

Somewhat off-topic for this forum, but I did eventually manage to create a "USB Blaster" clone, using a Teensy 3.5 board. Details here.

I did use a Raspberry Pi to program the Teensy :)
by Memotech Bill
Sat Jun 13, 2020 6:47 am
Forum: Beginners
Topic: Powering Raspberry Pi with DC 36v Power Supply
Replies: 13
Views: 1510

Re: Powering Raspberry Pi with DC 36v Power Supply

Transformers only work on AC. They rely on the varying current through the primary to produce an oscillating magnetic field, which then induces a voltage in the secondary. Transformers generally have a low DC resistance. As well as not working, connecting them to a DC supply is likely to burn out th...
by Memotech Bill
Thu Jun 11, 2020 7:27 am
Forum: Beginners
Topic: Saving data when overlay FS is on.
Replies: 3
Views: 348

Re: Saving data when overlay FS is on.

One option is to create a third partition on the SD card (using gparted). Format it as EXT4. Add it to /etc/fstab so that it is automatically mounted. Then save the data to that partition.
by Memotech Bill
Thu Jun 11, 2020 6:58 am
Forum: General discussion
Topic: Does the Pi 4 support wake on lan (wol)?
Replies: 14
Views: 22567

Re: Does the Pi 4 support wake on lan (wol)?

So rather than shutting down the Pi when not using it, just kill the Plex server. Use SSH to restart Plex when you want to use it again.

You could even create a small web interface to stop and start Plex.
by Memotech Bill
Fri Jun 05, 2020 8:41 pm
Forum: Python
Topic: how to combine 2 separate code blocks
Replies: 7
Views: 557

Re: how to combine 2 separate code blocks

To ask the stupid question, why combine the programs?

It seems to me that they are doing two different jobs. So just run the two programs in parallel.

It would be different if you were doing an autonomous robot, when the drive would need to be controlled in response to the camera.
by Memotech Bill
Tue Jun 02, 2020 6:55 am
Forum: Beginners
Topic: raspberry pi diagnostics (Explain!)
Replies: 5
Views: 775

Re: raspberry pi diagnostics (Explain!)

The test is explained in this blog entry:

https://www.raspberrypi.org/blog/sd-card-speed-test/
by Memotech Bill
Sun May 31, 2020 10:48 am
Forum: Advanced users
Topic: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED
Replies: 4
Views: 517

Re: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED

In the end I failed to get this to work :( Details can be found in the README at https://github.com/Memotech-Bill/Blaster_Gadget The ultimate cause of failure was that it does not appear to be possible to get the Raspberry Pi Zero USB port to work with an endpoint zero maximum packet length of 8 byt...
by Memotech Bill
Wed May 27, 2020 6:32 pm
Forum: Beginners
Topic: Limit Switch - "Normally Open" Fail Safe
Replies: 5
Views: 482

Re: Limit Switch - "Normally Open" Fail Safe

If you are monitoring the N/C connection, you should be able to see that open when you reach the limit, even if the N/O connection does not close.
by Memotech Bill
Wed May 27, 2020 5:59 pm
Forum: General discussion
Topic: Using a Pi 4 as a router
Replies: 2
Views: 297

Re: Using a Pi 4 as a router

Beyond enabling IP forwarding, any advice would depend upon why you want a router.

If you just want to learn, I suggest the following search terms:
  • Linux man route
  • Linux NAT routing
  • Linux iptables
  • Linux firewall
by Memotech Bill
Wed May 27, 2020 4:56 pm
Forum: General discussion
Topic: Using a Pi 4 as a router
Replies: 2
Views: 297

Re: Using a Pi 4 as a router

You probably need to enable IP forwarding. To test, log on to the RPi, and issue the command: sudo echo 1 > /proc/sys/net/ipv4/ip_forward You should then be able to route from a machine on one ethernet port to one on the other port. To make the change permanent over reboots, edit /etc/sysctl.conf. E...
by Memotech Bill
Sun May 24, 2020 2:30 pm
Forum: Advanced users
Topic: RPi Zero USB Gadget - Altera USB Blaster clone - FAILED
Replies: 4
Views: 517

RPi Zero USB Gadget - Altera USB Blaster clone - FAILED

I am trying to use an RPi Zero as a clone of an Altera "USB Blaster" CPLD programmer. I have a cheap "USB Blaster" clone, which the Altera Quartus software recognises as a valid programmer, but which fails to program the chip. This may be related to the fact that one of the conne...
by Memotech Bill
Sat May 16, 2020 7:16 am
Forum: C/C++
Topic: Writing a C program with plugin support
Replies: 7
Views: 808

Re: Writing a C program with plugin support

The last time I had this problem, my solution was: * Create an API of features I wanted the main program to expose to the plugins. * Create a struct containing function pointers to the routines of the API. * The plugins had a header file defining the API functions and their position in the struct. *...
by Memotech Bill
Wed May 13, 2020 7:09 am
Forum: C/C++
Topic: C Language
Replies: 20
Views: 1624

Re: C Language

I assume that the connection string, password etc are in plain in the source code. The compiler will do nothing to hide or encrypt them. You need two different programs. One to encrypt the data you want to hide. This can be as simple as XOR with a random string, or it could be a cryptographically se...
by Memotech Bill
Fri May 08, 2020 6:48 am
Forum: C/C++
Topic: Which GUI with chart i can use in Raspbian?
Replies: 2
Views: 544

Re: Which GUI with chart i can use in Raspbian?

Many choices. Since you are new to GUI programming, perhaps read:
https://magpi.raspberrypi.org/books/c-gui-programming

If you want to be able to run your program on many different computers:
https://www.wxwidgets.org/

Go to advanced search