WebControl Open Beta

I can make it configurable as to which GPIO does what function… so besides these, anything else we can think of?

  • HIGH/LOW on WebMCP running/not running
  • HIGH/LOW on WebControl running/not running
  • digitalRead to initiate soft shutdown
  • digitalRead to send ‘stop’ message to controller
  • digitalRead to send ‘pause’ message to controller
  • digitalRead to send ‘home’ message to controller

I haven’t done any GPIO programming on an RPi, but figure it can’t be hard.

2 Likes

I think we should stick with @gero’s solution for shutdown. It’s less specific to our software implementation and also neat you can use the same button to turn the pi back on again.

1 Like

Forgot about that post. Does it make any sense to make a GPIO that just stops only webmcp and webcontrol?

1 Like

I can’t think of a situation where I would want to shut those down but not the whole pi

3 Likes

Glad you¢re trying it out @dlang! Thanks for the feedback!

Only WebMCP gets updated at startup (with docker pull) and it generally only takes a long time the first time. I don¢t think @madgrizzle is making changes to WebMCP very often and a docker pull when there is nothing new to pull should only take a second or so.

That’s what I would have expected, but experience is showing that it takes a lot
longer to get booted up than it should take the pi to boot.

Yeah we should do this. @madgrizzle should we do this from WebMCP or should
maybe I add a systemd unit file to do it? I think WebMCP could still manage
the container after the systemd unit starts it up as long as I tell systemd to
not automatically restart the service.

this should be configurable through the WebMCP interface

David Lang

Are you using @johnboiles pre-built image? I haven’t updated webmcp, nor webcontrol, in a long time so it shouldn’t be downloading anything.

I think webcontrol should be started by webmcp… and making it configurable is also a good idea. Gives me something to finally put in webmcp settings!

And your Pi is connected to the internet right? Perhaps it would take a long time if the Pi was offline (the docker pull maybe would try until it times out). My Pi boots fairly quick ~30s I think until docker starts and WebMCP becomes available.

Works for me! I like the idea of having it configurable. You could also have an ‘auto-update Webcontrol on start’ setting

1 Like

Well, you asked :slight_smile:

support for external controls, such as a CNC pendant like these

these have four separate controls

  1. a speed swich

  2. an axis selector switch

  3. a rotery encoder

  4. emergancy stop

or a simple joystick like Small Arcade Joystick ID: 480 - $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits to give
directions (couple with speed selector and e-stop switches)

once we start down this road, adding an interface to a nunchuck (especially a
wireless one) would be very interesting.

David Lang

1 Like

I could think of wanting to restart them both, but not just shut them down.

David Lang

So are 1-3 intended to just move the ‘sled’ around the board?

Are you using @johnboiles pre-built image? I haven’t updated webmcp, nor webcontrol, in a long time so it shouldn’t be downloading anything.

yes, I ran into a case last night where it took about 10 min to boot.

when I first booted things up, I saw that it took a long time because the webmcp
update got stuck behind the pi doing it’s linux update, so it had to wait for it
to download and install all the packages that were newer than the image. This
took about 40 min the first time.

I think webcontrol should be started by webmcp… and making it configurable is also a good idea. Gives me something to finally put in webmcp settings!

yes, it gets started through webmcp, but only manually so far.

David Lang

Haha neat! If we use something bluetooth like a ps3 controller (cncjs supports this) or a wii remote + nunchuck, then we could do it pretty easily I think since the Pi3 has bluetooth. I don’t think I’d use this though. I always have my phone with me.

I’d probably benefit more from an alexa/siri integration for when I have my hands full (“Alexa tell maslow to move twenty inches to the left”, “Alexa tell Maslow to home the z axis”).

I’m not sure what you’re talking about here. What sort of linux update happens at boot? I dont know about anything that should be downloading packages on boot. Though I think the file-system might get resized on first boot.

I like that!

1 Like

yep, it’s connected.

as I said in my last post, it may be that it’s getting stuck behind other
updates happening. I know this happened on my first boot (where I had it
connected to a monitor)

David Lang

yes, they are replacements for the arrows in the upper right

David Lang

although they can (and are) used for simple milling/cutting operations as well.

David Lang

I dont know about any other updates that happen at boot (e.g. if you reflash your sd card). If you happen to see anything like this again, grab a picture.

Haha neat! If we use something bluetooth like a ps3 controller (cncjs
supports this
) or a wii remote +
nunchuck, then we could do it pretty easily I think since the Pi3 has
bluetooth. I don’t think I’d use this though. I always have my phone with me.

see the articles I linked to, the nunchuck is i2c and pretty easy to connect
directly to the pi (the wireless nunchuck needs a 5v supply)

I’m not sure what you’re talking about here. What sort of linux update
happens at boot? I dont know about anything that should be downloading
packages on boot. Though I think the file-system might get resized on first
boot.

the image as shipped has the unattended_upgrade package enabled
UnattendedUpgrades - Debian Wiki which auto-updates the system on a
schedule. It looks as if it may also do so at bootup (which is fairly
reasonable, the system may not be up at 2am when it’s otherwise scheduled to
run)

this pulls down all updated packages and installs them. This is a good thing
for long-term security

David Lang

Very interesting. I did not know about this.

acouple other requests

  1. an ability to view the g-code that’s been loaded (ideally to edit it, either in the webcontrol memory or ‘on disk’)

  2. the ability to feed it arbitrary g-code (to be run after the current program/buffer is finished), this will be a hook that can enable lots of external scripts to do things, but initially just a text windows/run button in webcontrol would be great to get.