Updating - shredder/asterix-pp

This commit is contained in:
lovebird 2024-07-03 00:26:09 +02:00
parent 0017ad1d9e
commit a0da6c36cd
21 changed files with 656 additions and 1167 deletions

3
shredder/asterix-pp/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
src
node_modules
package-lock.json

View File

@ -0,0 +1,150 @@
<p>Precious Plastic Single Axis Shredder, v3.4</p>
<h2 id="features">Features</h2>
<ul>
<li>Jam detection / Auto-Reverse</li>
<li>Rigid, flexible and modular framework &#x2013; enabling hacking and extensions</li>
<li>Electronics and wiring according to standards</li>
<li>Auto-Stop after being idle</li>
<li>Visual feedback</li>
</ul>
<p>
<hr />
Please always contact us by EMail : <b>sales@plastic-hub.com</b><br />
</p>
<hr />
<p>
<div style="clear:both" />
</p>
<div style="padding:16px;text-align: center;">
<div class="ty-vendor-plans">
<div class="ty-grid-list__item" style="float: left;border: 1px gray;">
<h4 id="authors">Specification</h4>
<table style="display:table;width:auto;margin-left:auto;margin-right:auto">
<thead>
<tr>
<th>Weight</th>
<th>70 Kg</th>
</tr>
</thead>
<tbody>
<tr>
<td>Knife Material</td>
<td>Stainless</td>
</tr>
<tr>
<td>Shaft</td>
<td>35mm</td>
</tr>
<tr>
<td>Voltage</td>
<td>220V or 380V</td>
</tr>
<tr>
<td>Motor &#x2013; Power</td>
<td>2.2kW</td>
</tr>
<tr>
<td>Type</td>
<td>Single Shaft</td>
</tr>
<tr>
<td>License</td>
<td><a href="https://ohwr.org/cernohl" style="color:#4C74B9">CERN Open Source Hardware License</a></td>
</tr>
<tr>
<td>Compliance</td>
<td>CE</td>
</tr>
<tr>
<td>Control</td>
<td>PLC &#x2013; Auto-Reverse</td>
</tr>
<tr>
<td>Sieve</td>
<td>5mm</td>
</tr>
<tr>
<td>Hexbar</td>
<td>32mm</td>
</tr>
<tr>
<td>Chamber</td>
<td>Steel &#x2013; Powder &#x2013; coated</td>
</tr>
<tr>
<td>Housing</td>
<td>Powder coated</td>
</tr>
</tbody>
</table>
</div>
<div class="ty-grid-list__item" style="float: left;text-align: left;border: 1px gray;">
<h4 id="authors">Authors</h4>
<ul>
<li><a href="https://osr-plastic.org" style="color:#4C74B9">PlasticHub S.L.</a></li>
<li><a href="https://www.mandin.earth/" style="color:#4C74B9">Jason Knight</a></li>
</ul>
</div>
</div>
</div>
<h2 id="components">Components</h2>
<h3 id="resources">Resources</h3>
<ul>
<li>
<p><a href="https://forum.osr-plastic.org/c/machines/sheetpress/63">Forum</a></p>
</li>
<li>
<p><a href="https://files.osr-plastic.org/files/osr-machines/products/shredder/asterix-pp"> Download </a></p>
</li>
<li>
<p><a href="http://files.osr-plastic.org/files/firmware/zoe_min-sm/">Firmware</a></p>
</li>
<li>
<p><a href="https://assets.osr-plastic.org/machines//shredder/asterix-pp/resources/edrawings.html"> 3D Preview </a></p>
</li>
<li>
<p><a href="https://git.osr-plastic.org/osr-plastic/osr-machines/src/branch/master/shredder/asterix-pp"> Source Code Repository </a></p>
<h3>Payment Terms</h3>
<p><b>Industrial machines</b> : 100% of the total cost of the machine(s) to be paid at the moment of the order.<br />
<b>Machines manufactured in-house</b> :
70% of the total cost of the machine(s) to be paid at the moment of the order.
The 30% left + transport fees to be paid at reception of tracking number of the shipping (no machine leaves the workshop without full
payment).
</p>
</li>
</ul>
<p>70% of the total cost of the machine(s) to be paid at the moment of the order.
The 30% left + transport fees to be paid at reception of tracking number of the shipping (no machine leaves the workshop without full
payment).</p>
<hr />
<table style="display:table;width:auto;margin-left:auto;margin-right:auto">
<tbody>
<tr>
<td>
<a href="https://www.instagram.com/osr_plastic/" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/instagram-logo.png" />
</a>
</td>
<td>
<a alt="Open Source Projects" href="https://git.osr-plastic.org/osr-plastic" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/github.png" />
</a>
</td>
<td>
<a alt="" href="tel:0034691952287" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/007-whatsapp.png" />
</a>
</td>
<td>
<a alt="" href="mailto:sales@plastic-hub.com" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/012-mail-2.png" />
</a>
</td>
</tr>
</tbody>
</table>

View File

@ -0,0 +1,165 @@
Precious Plastic Single Axis Shredder, v3.4
## Features
- Jam detection / Auto-Reverse
- Rigid, flexible and modular framework &#x2013; enabling hacking and extensions
- Electronics and wiring according to standards
- Auto-Stop after being idle
- Visual feedback
<hr/>
Please always contact us by EMail : <b>sales@plastic-hub.com</b><br/>
<hr/>
<div style="clear:both"/>
<div style="padding:16px;text-align: center;">
<div class="ty-vendor-plans">
<div class="ty-grid-list__item" style="float: left;border: 1px gray;">
<h4 id="authors">Specification</h4>
<table style="display:table;width:auto;margin-left:auto;margin-right:auto">
<thead>
<tr>
<th>Weight</th>
<th>70 Kg</th>
</tr>
</thead>
<tbody>
<tr>
<td>Knife Material</td>
<td>Stainless</td>
</tr>
<tr>
<td>Shaft</td>
<td>35mm</td>
</tr>
<tr>
<td>Voltage</td>
<td>220V or 380V</td>
</tr>
<tr>
<td>Motor &#x2013; Power</td>
<td>2.2kW</td>
</tr>
<tr>
<td>Type</td>
<td>Single Shaft</td>
</tr>
<tr>
<td>License</td>
<td><a href="https://ohwr.org/cernohl" style="color:#4C74B9">CERN Open Source Hardware License</a></td>
</tr>
<tr>
<td>Compliance</td>
<td>CE</td>
</tr>
<tr>
<td>Control</td>
<td>PLC &#x2013; Auto-Reverse</td>
</tr>
<tr>
<td>Sieve</td>
<td>5mm</td>
</tr>
<tr>
<td>Hexbar</td>
<td>32mm</td>
</tr>
<tr>
<td>Chamber</td>
<td>Steel &#x2013; Powder &#x2013; coated</td>
</tr>
<tr>
<td>Housing</td>
<td>Powder coated</td>
</tr>
</tbody>
</table>
</div>
<div class="ty-grid-list__item" style="float: left;text-align: left;border: 1px gray;">
<h4 id="authors">Authors</h4>
<ul>
<li><a href="https://osr-plastic.org" style="color:#4C74B9">PlasticHub S.L.</a></li>
<li><a href="https://www.mandin.earth/" style="color:#4C74B9">Jason Knight</a></li>
</ul>
</div>
</div>
</div>
## Components
### Resources
- [Forum](https://forum.osr-plastic.org/c/machines/sheetpress/63)
- [ Download ](https://files.osr-plastic.org/files/osr-machines/products/shredder/asterix-pp)
- [Firmware](http://files.osr-plastic.org/files/firmware/zoe_min-sm/)
- [ 3D Preview ](https://assets.osr-plastic.org/machines//shredder/asterix-pp/resources/edrawings.html)
- [ Source Code Repository ](https://git.osr-plastic.org/osr-plastic/osr-machines/src/branch/master/shredder/asterix-pp)
<h3>Payment Terms</h3>
<b>Industrial machines</b> : 100% of the total cost of the machine(s) to be paid at the moment of the order.<br/>
<b>Machines manufactured in-house</b> :
70% of the total cost of the machine(s) to be paid at the moment of the order.
The 30% left + transport fees to be paid at reception of tracking number of the shipping (no machine leaves the workshop without full
payment).
70% of the total cost of the machine(s) to be paid at the moment of the order.
The 30% left + transport fees to be paid at reception of tracking number of the shipping (no machine leaves the workshop without full
payment).
<hr/>
<table style="display:table;width:auto;margin-left:auto;margin-right:auto">
<tbody>
<tr>
<td>
<a href="https://www.instagram.com/osr_plastic/" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/instagram-logo.png"/>
</a>
</td>
<td>
<a alt="Open Source Projects" href="https://git.osr-plastic.org/osr-plastic" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/github.png"/>
</a>
</td>
<td>
<a alt="" href="tel:0034691952287" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/007-whatsapp.png"/>
</a>
</td>
<td>
<a alt="" href="mailto:sales@plastic-hub.com" style="color:#4C74B9">
<img width="30px" src="https://assets.osr-plastic.org/machines//assets/icons/012-mail-2.png"/>
</a>
</td>
</tr>
</tbody>
</table>

View File

@ -1,101 +0,0 @@
#
CC = gcc
SIZE = size
SHLIB = gcc -shared
STRIPLIB = strip --strip-unneeded
CFLAGS += -O3 -Wall -pthread
ALL = libpigpiod_if.so libpigpiod_if2.so pigs x_pigpiod_if x_pigpiod_if2
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
includedir = $(prefix)/include
libdir = $(prefix)/lib
mandir = $(prefix)/man
all: $(ALL) pigpio.py setup.py
pigpiod_if.o: pigpiod_if.c pigpio.h command.h pigpiod_if.h
$(CC) $(CFLAGS) -fpic -c -o pigpiod_if.o pigpiod_if.c
pigpiod_if2.o: pigpiod_if2.c pigpio.h command.h pigpiod_if2.h
$(CC) $(CFLAGS) -fpic -c -o pigpiod_if2.o pigpiod_if2.c
command.o: command.c pigpio.h command.h
$(CC) $(CFLAGS) -fpic -c -o command.o command.c
pigs: command.o pigs.o
$(CC) $(CFLAGS) -fpic -o pigs pigs.c command.c
x_pigpiod_if: x_pigpiod_if.o $(LIB1)
$(CC) -o x_pigpiod_if x_pigpiod_if.o $(LL1)
x_pigpiod_if2: x_pigpiod_if2.o $(LIB2)
$(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL2)
clean:
rm -f *.o *.i *.s *~ $(ALL)
install: $(LIB1) $(LIB2)
install -m 0755 -d $(DESTDIR)$(includedir)
install -m 0644 pigpio.h $(DESTDIR)$(includedir)
install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir)
install -m 0644 pigpiod_if2.h $(DESTDIR)$(includedir)
install -m 0755 -d $(DESTDIR)$(libdir)
install -m 0644 libpigpiod_if.so $(DESTDIR)$(libdir)
install -m 0644 libpigpiod_if2.so $(DESTDIR)$(libdir)
install -m 0755 -d $(DESTDIR)$(bindir)
install -m 0755 pigs $(DESTDIR)$(bindir)
python2 setup.py install
python3 setup.py install
install -m 0755 -d $(DESTDIR)$(mandir)/man1
install -m 0644 *.1 $(DESTDIR)$(mandir)/man1
install -m 0755 -d $(DESTDIR)$(mandir)/man3
install -m 0644 *.3 $(DESTDIR)$(mandir)/man3
uninstall:
rm -f $(DESTDIR)$(includedir)/pigpio.h
rm -f $(DESTDIR)$(includedir)/pigpiod_if.h
rm -f $(DESTDIR)$(includedir)/pigpiod_if2.h
rm -f $(DESTDIR)$(libdir)/libpigpiod_if.so
rm -f $(DESTDIR)$(libdir)/libpigpiod_if2.so
echo removing python2 files
python2 setup.py install --record /tmp/pigpio >/dev/null
xargs rm -f < /tmp/pigpio >/dev/null
echo removing python3 files
python3 setup.py install --record /tmp/pigpio >/dev/null
xargs rm -f < /tmp/pigpio >/dev/null
rm -f $(DESTDIR)$(bindir)/pigs
rm -f $(DESTDIR)$(mandir)/man1/pig*.1
rm -f $(DESTDIR)$(mandir)/man3/pig*.3
LL1 = -L. -lpigpiod_if -pthread -lrt
LL2 = -L. -lpigpiod_if2 -pthread -lrt
LIB1 = libpigpiod_if.so
OBJ1 = pigpiod_if.o command.o
LIB2 = libpigpiod_if2.so
OBJ2 = pigpiod_if2.o command.o
$(LIB1): $(OBJ1)
$(SHLIB) -o $(LIB1) $(OBJ1)
$(STRIPLIB) $(LIB1)
$(SIZE) $(LIB1)
$(LIB2): $(OBJ2)
$(SHLIB) -o $(LIB2) $(OBJ2)
$(STRIPLIB) $(LIB2)
$(SIZE) $(LIB2)
# generated using gcc -MM *.c
command.o: command.c pigpio.h command.h
pigpiod.o: pigpiod.c pigpio.h
pigpiod_if.o: pigpiod_if.c pigpio.h pigpiod_if.h command.h
pigpiod_if2.o: pigpiod_if2.c pigpio.h pigpiod_if2.h command.h
pigs.o: pigs.c pigpio.h command.h

View File

@ -1,133 +0,0 @@
#
CC = gcc
AR = ar
RANLIB = ranlib
SIZE = size
SHLIB = gcc -shared
STRIPLIB = strip --strip-unneeded
CFLAGS += -O3 -Wall -pthread
LIB1 = libpigpio.so
OBJ1 = pigpio.o command.o
LIB2 = libpigpiod_if.so
OBJ2 = pigpiod_if.o command.o
LIB3 = libpigpiod_if2.so
OBJ3 = pigpiod_if2.o command.o
LIB = $(LIB1) $(LIB2) $(LIB3)
ALL = $(LIB) x_pigpio x_pigpiod_if x_pigpiod_if2 pig2vcd pigpiod pigs
LL1 = -L. -lpigpio -pthread -lrt
LL2 = -L. -lpigpiod_if -pthread -lrt
LL3 = -L. -lpigpiod_if2 -pthread -lrt
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
includedir = $(prefix)/include
libdir = $(prefix)/lib
mandir = $(prefix)/man
all: $(ALL)
pigpio.o: pigpio.c pigpio.h command.h custom.cext
$(CC) $(CFLAGS) -fpic -c -o pigpio.o pigpio.c
pigpiod_if.o: pigpiod_if.c pigpio.h command.h pigpiod_if.h
$(CC) $(CFLAGS) -fpic -c -o pigpiod_if.o pigpiod_if.c
pigpiod_if2.o: pigpiod_if2.c pigpio.h command.h pigpiod_if2.h
$(CC) $(CFLAGS) -fpic -c -o pigpiod_if2.o pigpiod_if2.c
command.o: command.c pigpio.h command.h
$(CC) $(CFLAGS) -fpic -c -o command.o command.c
x_pigpio: x_pigpio.o $(LIB1)
$(CC) -o x_pigpio x_pigpio.o $(LL1)
x_pigpiod_if: x_pigpiod_if.o $(LIB2)
$(CC) -o x_pigpiod_if x_pigpiod_if.o $(LL2)
x_pigpiod_if2: x_pigpiod_if2.o $(LIB3)
$(CC) -o x_pigpiod_if2 x_pigpiod_if2.o $(LL3)
pigpiod: pigpiod.o $(LIB1)
$(CC) -o pigpiod pigpiod.o $(LL1)
pigs: pigs.o command.o
$(CC) -o pigs pigs.o command.o
pig2vcd: pig2vcd.o
$(CC) -o pig2vcd pig2vcd.o
clean:
rm -f *.o *.i *.s *~ $(ALL)
install: $(ALL)
install -m 0755 -d $(DESTDIR)/opt/pigpio/cgi
install -m 0755 -d $(DESTDIR)$(includedir)
install -m 0644 pigpio.h $(DESTDIR)$(includedir)
install -m 0644 pigpiod_if.h $(DESTDIR)$(includedir)
install -m 0644 pigpiod_if2.h $(DESTDIR)$(includedir)
install -m 0755 -d $(DESTDIR)$(libdir)
install -m 0755 libpigpio.so $(DESTDIR)$(libdir)
install -m 0755 libpigpiod_if.so $(DESTDIR)$(libdir)
install -m 0755 libpigpiod_if2.so $(DESTDIR)$(libdir)
install -m 0755 -d $(DESTDIR)$(bindir)
install -m 0755 -s pig2vcd $(DESTDIR)$(bindir)
install -m 0755 -s pigpiod $(DESTDIR)$(bindir)
install -m 0755 -s pigs $(DESTDIR)$(bindir)
if which python2; then python2 setup.py install; fi
if which python3; then python3 setup.py install; fi
install -m 0755 -d $(DESTDIR)$(mandir)/man1
install -m 0644 *.1 $(DESTDIR)$(mandir)/man1
install -m 0755 -d $(DESTDIR)$(mandir)/man3
install -m 0644 *.3 $(DESTDIR)$(mandir)/man3
ldconfig
uninstall:
rm -f $(DESTDIR)$(includedir)/pigpio.h
rm -f $(DESTDIR)$(includedir)/pigpiod_if.h
rm -f $(DESTDIR)$(includedir)/pigpiod_if2.h
rm -f $(DESTDIR)$(libdir)/libpigpio.so
rm -f $(DESTDIR)$(libdir)/libpigpiod_if.so
rm -f $(DESTDIR)$(libdir)/libpigpiod_if2.so
rm -f $(DESTDIR)$(bindir)/pig2vcd
rm -f $(DESTDIR)$(bindir)/pigpiod
rm -f $(DESTDIR)$(bindir)/pigs
if which python2; then python2 setup.py install --record /tmp/pigpio >/dev/null; xargs rm -f < /tmp/pigpio >/dev/null; fi
if which python3; then python3 setup.py install --record /tmp/pigpio >/dev/null; xargs rm -f < /tmp/pigpio >/dev/null; fi
rm -f $(DESTDIR)$(mandir)/man1/pig*.1
rm -f $(DESTDIR)$(mandir)/man3/pig*.3
ldconfig
$(LIB1): $(OBJ1)
$(SHLIB) -o $(LIB1) $(OBJ1)
$(STRIPLIB) $(LIB1)
$(SIZE) $(LIB1)
$(LIB2): $(OBJ2)
$(SHLIB) -o $(LIB2) $(OBJ2)
$(STRIPLIB) $(LIB2)
$(SIZE) $(LIB2)
$(LIB3): $(OBJ3)
$(SHLIB) -o $(LIB3) $(OBJ3)
$(STRIPLIB) $(LIB3)
$(SIZE) $(LIB3)
# generated using gcc -MM *.c
pig2vcd.o: pig2vcd.c pigpio.h
pigpiod.o: pigpiod.c pigpio.h
pigs.o: pigs.c pigpio.h command.h
x_pigpio.o: x_pigpio.c pigpio.h
x_pigpiod_if.o: x_pigpiod_if.c pigpiod_if.h pigpio.h
x_pigpiod_if2.o: x_pigpiod_if2.c pigpiod_if2.h pigpio.h

View File

@ -1,173 +0,0 @@
NOTE
The initial part of the make, the compilation of pigpio.c,
takes 100 seconds on early model Pis. Be patient. The overall
install takes just over 3 minutes.
INSTALL
Extract the archive to a directory.
IN THAT DIRECTORY
Enter the following two commands (in this order)
make
sudo make install
This will install
o the library (libpigpio.so) in /usr/local/lib
o the library (libpigpiod_if.so) in /usr/local/lib
o the library (libpigpiod_if2.so) in /usr/local/lib
o the header file (pigpio.h) in /usr/local/include
o the header file (pigpiod_if.h) in /usr/local/include
o the header file (pigpiod_if2.h) in /usr/local/include
o the daemon (pigpiod) in /usr/local/bin
o the socket interface (pigs) in /usr/local/bin
o the utility pig2vcd in /usr/local/bin
o man pages in /usr/local/man/man1 and /usr/local/man/man3
o the Python module pigpio.py for Python 2 and 3
TEST (optional)
*** WARNING ************************************************
* *
* All the tests make extensive use of gpio 4 (pin P1/J8-7).*
* Ensure that either nothing or just a LED is connected to *
* gpio 4 before running any of the tests. *
* *
* Some tests are statistical in nature and so may on *
* occasion fail. Repeated failures on the same test or *
* many failures in a group of tests indicate a problem. *
************************************************************
To test the library do
sudo ./x_pigpio
To test the pigpio daemon do
sudo pigpiod
./x_pigpiod_if # test the C I/F to the pigpio daemon
./x_pigpiod_if2 # test the C I/F to the pigpio daemon
./x_pigpio.py # test the Python I/F to the pigpio daemon
./x_pigs # test the socket I/F to the pigpio daemon
./x_pipe # test the pipe I/F to the pigpio daemon
EXAMPLE CODE
x_pigpio.c, pig2vcd.c, and pigpiod.c show examples of interfacing
with the pigpio library.
pigs.c, pigpio.py, x_pigpiod_if, x_pigpiod_if2.c, x_pigpio.py,
x_pigs, and x_pipe show examples of interfacing with the pigpio
daemon. x_pipe uses the pipe interface, the others use the
socket interface.
DAEMON
To launch the daemon do
sudo pigpiod (pigpiod -? for options)
Once the daemon is launched the socket and pipe interfaces will be
available.
When the library starts it locks
/var/run/pigpio.pid
The file should be automatically deleted when the library terminates.
SOCKET INTERFACE
Use pigs for the socket interface (pigs help for help).
PIPE INTERFACE
The pipe interface accepts commands written to /dev/pigpio.
Results are read from /dev/pigout.
Errors are output on /dev/pigerr.
To test the pipe interface perhaps do
cat /dev/pigout &
cat /dev/pigerr &
echo "help" >/dev/pigpio
PYTHON MODULE
The Python pigpio module is installed to the default Python location
for Python 2 and Python 3.
You can install it for additional Python versions by
pythonx.y setup.py install
where x.y is the Python version.
STOP DAEMON
To stop the pigpiod daemon
sudo killall pigpiod
RUNNING ON NON Pi's
You can access the pigpiod daemon running on the Pi from any machine which
is connected to it over the network. This access is via the socket interface.
In particular this allows you to use the following on non-Pi's.
o pigs
o the pigpio Python module
o the C socket I/F using libpigpiod_if (header file pigpiod_if.h)
o the C socket I/F using libpigpiod_if2 (header file pigpiod_if2.h)
On a Linux machine
make -f MakeRemote clean
make -f MakeRemote
make -f MakeRemote install
This will install
o the library (libpigpiod_if.so) in /usr/local/lib
o the library (libpigpiod_if2.so) in /usr/local/lib
o the header file (pigpio.h) in /usr/local/include
o the header file (pigpiod_if.h) in /usr/local/include
o the header file (pigpiod_if2.h) in /usr/local/include
o the socket interface (pigs) in /usr/local/bin
o man pages in /usr/local/man/man1 and /usr/local/man/man3
o the Python module pigpio.py
On Windows machines (and possibly Macs)
The Python module should install with
python setup.py install
pigs, pigpiod_if, and pigpiod_if2 will need minor mods to
reflect the Windows/Mac socket interface.
DOCUMENTATION
The most up to date should be http://abyz.co.uk/rpi/pigpio/
On the Pi try
man pigs
man pigpiod
man pig2vcd
man pigpio
man pigpiod_if
man pigpiod_if2
pydoc pigpio

View File

@ -1,25 +0,0 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>

View File

@ -1,310 +0,0 @@
#!/bin/bash
GPIO=25
#
# This script serves as a confidence check that the socket interface to
# the pigpio library is ok.
#
# The script uses gpio 25 (pin 22). Make sure that nothing (or only a LED)
# is connected to gpio 25 before running the script.
#
# To run the script
# sudo pigpiod # if not already running on the Pi
# export PIGPIO_ADDR=pi_host # to specify the Pi if testing remotely
# ./x_pigs
#
# Some tests are statistical in nature and so may on occasion fail.
# Repeated failures on the same test or many failures in a group
# of tests indicate a problem.
#
echo
echo "Testing pigpio pigs"
s=$(pigs pigpv)
echo "pigpio version $s"
s=$(pigs bc1 0)
if [[ $s = "" ]]; then echo "BC1 ok"; else echo "BC1 fail ($s)"; fi
s=$(pigs bc2 0)
if [[ $s = "" ]]; then echo "BC2 ok"; else echo "BC2 fail ($s)"; fi
s=$(pigs br1)
if [[ ${#s} = 8 ]]
then echo "BR1 ok"
else echo "BR1 fail ($s)"
fi
s=$(pigs br2)
if [[ ${#s} = 8 ]]
then echo "BR2 ok"
else echo "BR2 fail ($s)"
fi
s=$(pigs bs1 0)
if [[ $s = "" ]]; then echo "BS1 ok"; else echo "BS1 fail ($s)"; fi
s=$(pigs bs2 0)
if [[ $s = "" ]]; then echo "BS2 ok"; else echo "BS2 fail ($s)"; fi
s=$(pigs h)
if [[ ${#s} = 5273 ]]; then echo "HELP ok"; else echo "HELP fail (${#s})"; fi
s=$(pigs hwver)
if [[ $s -ne 0 ]]; then echo "HWVER ok"; else echo "HWVER fail ($s)"; fi
s=$(pigs mics 1000)
if [[ $s = "" ]]; then echo "MICS ok"; else echo "MICS fail ($s)"; fi
s=$(pigs mils 10)
if [[ $s = "" ]]; then echo "MILS ok"; else echo "MILS fail ($s)"; fi
s=$(pigs modes $GPIO 0)
s=$(pigs modeg $GPIO)
if [[ $s = 4 ]]; then echo "MODEG ok"; else echo "MODEG fail ($s)"; fi
s=$(pigs m $GPIO r)
s=$(pigs mg $GPIO)
if [[ $s = 0 ]]; then echo "MODES ok"; else echo "MODES fail ($s)"; fi
h=$(pigs no)
if [[ $h -ge 0 && $h -le 31 ]]
then echo "NO($h) ok"
else echo "NO fail ($s)"
fi
s=$(pigs nb $h 0xabcd)
if [[ $s = "" ]]; then echo "NB($h) ok"; else echo "NB fail ($s)"; fi
s=$(pigs np $h)
if [[ $s = "" ]]; then echo "NP($h) ok"; else echo "NP fail ($s)"; fi
s=$(pigs nc $h)
if [[ $s = "" ]]; then echo "NC($h) ok"; else echo "NC fail ($s)"; fi
s=$(pigs pfs $GPIO 800)
if [[ $s = 800 ]]; then echo "PFG-a ok"; else echo "PFG-a fail ($s)"; fi
s=$(pigs pfg $GPIO)
if [[ $s = 800 ]]; then echo "PFG-b ok"; else echo "PFG-b fail ($s)"; fi
s=$(pigs pfs $GPIO 0)
if [[ $s = 10 ]]; then echo "PFS-a ok"; else echo "PFS-a fail ($s)"; fi
s=$(pigs pfs $GPIO 800)
if [[ $s = 800 ]]; then echo "PFS-b ok"; else echo "PFS-b fail ($s)"; fi
s=$(pigs prs $GPIO 255)
if [[ $s = 250 ]]; then echo "PRG-a ok"; else echo "PRG-a fail ($s)"; fi
s=$(pigs prg $GPIO)
if [[ $s = 255 ]]; then echo "PRG-b ok"; else echo "PRG-b fail ($s)"; fi
p=$(pigs proc ld p1 p0 ld p0 1234 tag 999 mils 1000 jmp 999)
if [[ $p -ge 0 && $p -le 31 ]]
then echo "PROC($p) ok"
else echo "PROC($p) fail ($s)"
fi
sleep 0.1 # Make sure script has time to intialise.
s=$(pigs procr $p 9876)
if [[ $s = "" ]]; then echo "PROCR($p) ok"; else echo "PROCR($p) fail ($s)"; fi
s=$(pigs procp $p)
v=(${s// / })
if [[ ${v[0]} = 2 && ${v[1]} = 1234 && ${v[2]} = 9876 ]]
then echo "PROCP($p) ok"
else echo "PROCP($p) fail ($s)"
fi
s=$(pigs procs $p)
if [[ $s = "" ]]; then echo "PROCS($p) ok"; else echo "PROCS($p) fail ($s)"; fi
s=$(pigs procd $p)
if [[ $s = "" ]]; then echo "PROCD($p) ok"; else echo "PROCD($p) fail ($s)"; fi
s=$(pigs prrg $GPIO)
if [[ $s = 250 ]]; then echo "PRRG ok"; else echo "PRRG fail ($s)"; fi
s=$(pigs prs $GPIO 1000)
if [[ $s = 250 ]]; then echo "PRS-a ok"; else echo "PRS-a fail ($s)"; fi
s=$(pigs prg $GPIO)
if [[ $s = 1000 ]]; then echo "PRS-b ok"; else echo "PRS-b fail ($s)"; fi
s=$(pigs prs $GPIO 255)
if [[ $s = 250 ]]; then echo "PRS-c ok"; else echo "PRS-c fail ($s)"; fi
s=$(pigs prg $GPIO)
if [[ $s = 255 ]]; then echo "PRS-d ok"; else echo "PRS-d fail ($s)"; fi
s=$(pigs pud $GPIO u)
if [[ $s = "" ]]; then echo "PUD-a ok"; else echo "PUD-a fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 1 ]]; then echo "PUD-b ok"; else echo "PUD-b fail ($s)"; fi
s=$(pigs pud $GPIO d)
if [[ $s = "" ]]; then echo "PUD-c ok"; else echo "PUD-c fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 0 ]]; then echo "PUD-d ok"; else echo "PUD-d fail ($s)"; fi
s=$(pigs pud $GPIO o)
if [[ $s = "" ]]; then echo "PUD-e ok"; else echo "PUD-e fail ($s)"; fi
s=$(pigs p $GPIO 128)
if [[ $s = "" ]]; then echo "PWM-a ok"; else echo "PWM-a fail ($s)"; fi
s=$(pigs gdc $GPIO)
if [[ $s = 128 ]]; then echo "GDC-a ok"; else echo "GDC-a fail ($s)"; fi
s=$(pigs pwm $GPIO 64)
if [[ $s = "" ]]; then echo "PWM-b ok"; else echo "PWM-b fail ($s)"; fi
s=$(pigs GDC $GPIO)
if [[ $s = 64 ]]; then echo "GDC-b ok"; else echo "GDC-b fail ($s)"; fi
s=$(pigs pwm $GPIO 0)
if [[ $s = "" ]]; then echo "PWM-c ok"; else echo "PWM-c fail ($s)"; fi
s=$(pigs gdc $GPIO)
if [[ $s = 0 ]]; then echo "GDC-c ok"; else echo "GDC-c fail ($s)"; fi
s=$(pigs m $GPIO r)
if [[ $s = "" ]]; then echo "PWM-d ok"; else echo "PWM-d fail ($s)"; fi
s=$(pigs pud $GPIO u)
if [[ $s = "" ]]; then echo "READ-a ok"; else echo "READ-a fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 1 ]]; then echo "READ-b ok"; else echo "READ-b fail ($s)"; fi
s=$(pigs pud $GPIO d)
if [[ $s = "" ]]; then echo "READ-c ok"; else echo "READ-c fail ($s)"; fi
s=$(pigs read $GPIO)
if [[ $s = 0 ]]; then echo "READ-d ok"; else echo "READ-d fail ($s)"; fi
s=$(pigs pud $GPIO o)
if [[ $s = "" ]]; then echo "READ-e ok"; else echo "READ-e fail ($s)"; fi
s=$(pigs s $GPIO 500)
if [[ $s = "" ]]; then echo "SERVO-a ok"; else echo "SERVO-a fail ($s)"; fi
s=$(pigs gpw $GPIO)
if [[ $s = 500 ]]; then echo "GPW-a ok"; else echo "GPW-a fail ($s)"; fi
s=$(pigs servo $GPIO 2500)
if [[ $s = "" ]]; then echo "SERVO-b ok"; else echo "SERVO-b fail ($s)"; fi
s=$(pigs gpw $GPIO)
if [[ $s = 2500 ]]; then echo "GPW-b ok"; else echo "GPW-b fail ($s)"; fi
s=$(pigs servo $GPIO 0)
if [[ $s = "" ]]; then echo "SERVO-c ok"; else echo "SERVO-c fail ($s)"; fi
s=$(pigs gpw $GPIO)
if [[ $s = 0 ]]; then echo "GPW-c ok"; else echo "GPW-c fail ($s)"; fi
s=$(pigs w $GPIO 1)
if [[ $s = "" ]]; then echo "SERVO-d ok"; else echo "SERVO-d fail ($s)"; fi
s=$(pigs wvclr)
if [[ $s = "" ]]; then echo "SLR-a ok"; else echo "SLR-a fail ($s)"; fi
s=$(pigs slro $GPIO 4800 8)
if [[ $s = "" ]]; then echo "SLR-b ok"; else echo "SLR-b fail ($s)"; fi
s=$(pigs wvas $GPIO 4800 8 2 0 0x6d 0x79 0x20 0x6e 0x61 0x6d 0x65 0x20 0x69 0x73 0x20 0x6a 0x6f 0x61 0x6e)
if [[ $s = 95 ]]; then echo "SLR-c ok"; else echo "SLR-c fail ($s)"; fi
s=$(pigs m $GPIO w)
if [[ $s = "" ]]; then echo "SLR-d ok"; else echo "SLR-d fail ($s)"; fi
w=$(pigs wvcre)
if [[ $w -ge 0 ]]; then echo "WVCRE ok"; else echo "WVCRE fail ($s)"; fi
s=$(pigs wvtx $w)
if [[ $s = 191 ]]; then echo "SLR-e ok"; else echo "SLR-e fail ($s)"; fi
sleep 0.4
s=$(pigs slr $GPIO 100)
e="15 109 121 32 110 97 109 101 32 105 115 32 106 111 97 110"
if [[ $s = $e ]]
then echo "SLR-f ok"
else echo "SLR-f fail with [$s]"
fi
s=$(pigs slrc $GPIO)
if [[ $s = "" ]]; then echo "SLR-g ok"; else echo "SLR-g fail ($s)"; fi
t=$(pigs t tick)
v=(${t// / })
s=$((v[1]-v[0]))
if [[ $s -gt 0 && $s -lt 2000 ]]
then echo "TICK ok"
else echo "TICK fail($s)"
fi
pigs w $GPIO 1 # put in known state
s=$(pigs trig $GPIO 10 1)
if [[ $s = "" ]]; then echo "TRIG-a ok"; else echo "TRIG-a fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 0 ]]; then echo "TRIG-b ok"; else echo "TRIG-b fail ($s)"; fi
s=$(pigs trig $GPIO 10 0)
if [[ $s = "" ]]; then echo "TRIG-c ok"; else echo "TRIG-c fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 1 ]]; then echo "TRIG-d ok"; else echo "TRIG-d fail ($s)"; fi
s=$(pigs wdog $GPIO 1000)
if [[ $s = "" ]]; then echo "WDOG-a ok"; else echo "WDOG-a fail ($s)"; fi
s=$(pigs wdog $GPIO 0)
if [[ $s = "" ]]; then echo "WDOG-b ok"; else echo "WDOG-b fail ($s)"; fi
s=$(pigs w $GPIO 1)
if [[ $s = "" ]]; then echo "WRITE-a ok"; else echo "WRITE-a fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 1 ]]; then echo "WRITE-b ok"; else echo "WRITE-b fail ($s)"; fi
s=$(pigs write $GPIO 0)
if [[ $s = "" ]]; then echo "WRITE-c ok"; else echo "WRITE-c fail ($s)"; fi
s=$(pigs r $GPIO)
if [[ $s = 0 ]]; then echo "WRITE-d ok"; else echo "WRITE-d fail ($s)"; fi
s=$(pigs wvclr )
if [[ $s = "" ]]; then echo "WVCLR ok"; else echo "WVCLR fail ($s)"; fi
s=$(pigs wvas $GPIO 300 8 2 0 0x74 0x68 0x69 0x73 0x20 0x69 0x73 0x20 0x74 0x68 0x65 0x6e 0x20 0x77 0x69 0x6e 0x74 0x65 0x72 0x20 0x6f 0x66 0x20 0x6d 0x79 0x20 0x64 0x69 0x73 0x63 0x6f 0x6e 0x74 0x65 0x6e 0x74 0x20 0x6d 0x61 0x64 0x65 0x20 0x67 0x6c 0x6f 0x72 0x69 0x6f 0x75 0x73)
if [[ $s = 309 ]]; then echo "WVAS ok"; else echo "WVAS fail ($s)"; fi
s=$(pigs wvag 16 0 5000000 0 16 5000000)
if [[ $s = 310 ]]; then echo "WVAG ok"; else echo "WVAG fail ($s)"; fi
w=$(pigs wvcre)
if [[ $w -ge 0 ]]; then echo "WVCRE ok"; else echo "WVCRE fail ($s)"; fi
s=$(pigs wvtx $w)
if [[ ($s = 621) || ($s = 1137) ]]
then echo "WVTX ok"
else echo "WVTX fail ($s)"
fi
s=$(pigs wvbsy)
if [[ $s = 1 ]]; then echo "WVBSY-a ok"; else echo "WVBSY-a fail ($s)"; fi
sleep 1
s=$(pigs wvbsy)
if [[ $s = 1 ]]; then echo "WVBSY-b ok"; else echo "WVBSY-b fail ($s)"; fi
s=$(pigs wvhlt)
if [[ $s = "" ]]; then echo "WVHLT ok"; else echo "WVHLT fail ($s)"; fi
s=$(pigs wvbsy)
if [[ $s = 0 ]]; then echo "WVBSY-c ok"; else echo "WVBSY-c fail ($s)"; fi
s=$(pigs wvtxr $w)
if [[ ($s = 621) || ($s = 1137) ]]
then echo "WVTXR ok"
else echo "WVTXR fail ($s)"
fi
s=$(pigs wvbsy)
if [[ $s = 1 ]]; then echo "WVBSY-d ok"; else echo "WVBSY-d fail ($s)"; fi
s=$(pigs wvhlt)
if [[ $s = "" ]]; then echo "WVHLT ok"; else echo "WVHLT fail ($s)"; fi
s=$(pigs wvbsy)
if [[ $s = 0 ]]; then echo "WVBSY-e ok"; else echo "WVBSY-e fail ($s)"; fi
s=$(pigs wvsc 0)
if [[ ($s = 620) || ($s = 933) ]]
then echo "WVSC-a ok"
else echo "WVSC-a fail ($s)"
fi
s=$(pigs wvsc 1)
if [[ $s -ge 620 ]]; then echo "WVSC-b ok"; else echo "WVSC-b fail ($s)"; fi
s=$(pigs wvsc 2)
if [[ $s = 25016 ]]; then echo "WVSC-c ok"; else echo "WVSC-c fail ($s)"; fi
s=$(pigs wvsm 0)
if [[ $s = 10000000 ]]; then echo "WVSM-a ok"; else echo "WVSM-a fail ($s)"; fi
s=$(pigs wvsm 1)
if [[ $s -ge 10000000 ]]; then echo "WVSM-b ok"; else echo "WVSM-b fail ($s)"; fi
s=$(pigs wvsm 2)
if [[ $s = 1800000000 ]]
then echo "WVSM-c ok"
else echo "WVSM-c fail ($s)"
fi
s=$(pigs wvsp 0)
if [[ $s = 310 ]]; then echo "WVSP-a ok"; else echo "WVSP-a fail ($s)"; fi
s=$(pigs wvsp 1)
if [[ $s -ge 310 ]]; then echo "WVSP-b ok"; else echo "WVSP-b fail ($s)"; fi
s=$(pigs wvsp 2)
if [[ $s = 12000 ]]; then echo "WVSP-c ok"; else echo "WVSP-c fail ($s)"; fi

View File

@ -1,425 +0,0 @@
#!/bin/bash
GPIO=25
#
# This script serves as a confidence check that the pipe interface to
# the pigpio library is ok.
#
# The script uses gpio 25 (pin 22). Make sure that nothing (or only a LED)
# is connected to gpio 25 before running the script.
#
# To run the script
# sudo pigpiod # if not already running
# ./x_pipe # on the Pi running pigpiod
#
# Some tests are statistical in nature and so may on occasion fail.
# Repeated failures on the same test or many failures in a group
# of tests indicate a problem.
#
echo
echo "Testing pigpio pipe I/F"
echo "pigpv" >/dev/pigpio
read -t 1 s </dev/pigout
echo "pigpio version $s"
echo "bc1 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "BC1 ok"; else echo "BC1 fail ($s)"; fi
echo "bc2 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "BC2 ok"; else echo "BC2 fail ($s)"; fi
echo "br1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ ${#s} = 8 ]]
then echo "BR1 ok"
else echo "BR1 fail ($s)"
fi
echo "br2" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ ${#s} = 8 ]]
then echo "BR2 ok"
else echo "BR2 fail ($s)"
fi
echo "bs1 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "BS1 ok"; else echo "BS1 fail ($s)"; fi
echo "bs2 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "BS2 ok"; else echo "BS2 fail ($s)"; fi
echo "h" >/dev/pigpio
read -t 1 s </dev/pigout
read -t 1 s </dev/pigout
if [[ $s = "BC1 bits Clear GPIO in bank 1" ]]
then echo "HELP-a ok"
else echo "HELP-a fail ($s)"
fi
read -t 1 -N 9000 </dev/pigout # dump rest of help
echo "help" >/dev/pigpio
read -t 1 s </dev/pigout
read -t 1 s </dev/pigout
if [[ $s = "BC1 bits Clear GPIO in bank 1" ]]
then echo "HELP-b ok"
else echo "HELP-b fail ($s)"
fi
read -t 1 -N 9000 </dev/pigout # dump rest of help
echo "hwver" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s -ne 0 ]]; then echo "HWVER ok"; else echo "HWVER fail ($s)"; fi
echo "mics 1000" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "MICS ok"; else echo "MICS fail ($s)"; fi
echo "mils 10" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "MILS ok"; else echo "MILS fail ($s)"; fi
echo "modes $GPIO 0" >/dev/pigpio
read -t 1 s </dev/pigout
echo "modeg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 4 ]]; then echo "MODEG ok"; else echo "MODEG fail ($s)"; fi
echo "m $GPIO r" >/dev/pigpio
read -t 1 s </dev/pigout
echo "mg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "MODES ok"; else echo "MODES fail ($s)"; fi
echo "no" >/dev/pigpio
read -t 1 h </dev/pigout
if [[ $h -ge 0 && $h -le 31 ]]
then echo "NO($h) ok"
else echo "NO fail ($s)"
fi
echo "nb $h 0xabcd" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "NB($h) ok"; else echo "NB fail ($s)"; fi
echo "np $h" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "NP($h) ok"; else echo "NP fail ($s)"; fi
echo "nc $h" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "NC($h) ok"; else echo "NC fail ($s)"; fi
echo "pfs $GPIO 800" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 800 ]]; then echo "PFG-a ok"; else echo "PFG-a fail ($s)"; fi
echo "pfg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 800 ]]; then echo "PFG-b ok"; else echo "PFG-b fail ($s)"; fi
echo "pfs $GPIO 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 10 ]]; then echo "PFS-a ok"; else echo "PFS-a fail ($s)"; fi
echo "pfs $GPIO 800" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 800 ]]; then echo "PFS-b ok"; else echo "PFS-b fail ($s)"; fi
echo "prs $GPIO 255" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 250 ]]; then echo "PRG-a ok"; else echo "PRG-a fail ($s)"; fi
echo "prg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 255 ]]; then echo "PRG-b ok"; else echo "PRG-b fail ($s)"; fi
echo "proc ld p1 p0 ld p0 29 tag 9 mils 1000 jmp 9" >/dev/pigpio
read -t 1 p </dev/pigout
if [[ $p -ge 0 && $p -le 31 ]]
then echo "PROC($p) ok"
else echo "PROC($p) fail ($s)"
fi
sleep 0.1 # Make sure script has time to intialise.
echo "procr $p 9876" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PROCR($p) ok"; else echo "PROCR($p) fail ($s)"; fi
echo "procp $p" >/dev/pigpio
read -t 1 -a v </dev/pigout
if [[ ${v[0]} = 2 && ${v[1]} = 29 && ${v[2]} = 9876 ]]
then echo "PROCP($p) ok"
else echo "PROCP($p) fail ($s)"
fi
echo "procs $p" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PROCS($p) ok"; else echo "PROCS($p) fail ($s)"; fi
echo "procd $p" >/dev/pigpio
sleep 0.1
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PROCD($p) ok"; else echo "PROCD($p) fail ($s)"; fi
echo "prrg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 250 ]]; then echo "PRRG ok"; else echo "PRRG fail ($s)"; fi
echo "prs $GPIO 1000" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 250 ]]; then echo "PRS-a ok"; else echo "PRS-a fail ($s)"; fi
echo "prg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1000 ]]; then echo "PRS-b ok"; else echo "PRS-b fail ($s)"; fi
echo "prs $GPIO 255" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 250 ]]; then echo "PRS-c ok"; else echo "PRS-c fail ($s)"; fi
echo "prg $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 255 ]]; then echo "PRS-d ok"; else echo "PRS-d fail ($s)"; fi
echo "pud $GPIO u" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PUD-a ok"; else echo "PUD-a fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "PUD-b ok"; else echo "PUD-b fail ($s)"; fi
echo "pud $GPIO d" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PUD-c ok"; else echo "PUD-c fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PUD-d ok"; else echo "PUD-d fail ($s)"; fi
echo "pud $GPIO o" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PUD-e ok"; else echo "PUD-e fail ($s)"; fi
echo "p $GPIO 128" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PWM-a ok"; else echo "PWM-a fail ($s)"; fi
echo "gdc $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 128 ]]; then echo "GDC-a ok"; else echo "GDC-a fail ($s)"; fi
echo "pwm $GPIO 64" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PWM-b ok"; else echo "PWM-b fail ($s)"; fi
echo "GDC $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 64 ]]; then echo "GDC-b ok"; else echo "GDC-b fail ($s)"; fi
echo "pwm $GPIO 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PWM-c ok"; else echo "PWM-c fail ($s)"; fi
echo "gdc $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "GDC-c ok"; else echo "GDC-c fail ($s)"; fi
echo "m $GPIO r" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "PWM-d ok"; else echo "PWM-d fail ($s)"; fi
echo "pud $GPIO u" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "READ-a ok"; else echo "READ-a fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "READ-b ok"; else echo "READ-b fail ($s)"; fi
echo "pud $GPIO d" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "READ-c ok"; else echo "READ-c fail ($s)"; fi
echo "read $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "READ-d ok"; else echo "READ-d fail ($s)"; fi
echo "pud $GPIO o" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "READ-e ok"; else echo "READ-e fail ($s)"; fi
echo "s $GPIO 500" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SERVO-a ok"; else echo "SERVO-a fail ($s)"; fi
echo "gpw $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 500 ]]; then echo "GPW-a ok"; else echo "GPW-a fail ($s)"; fi
echo "servo $GPIO 2500" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SERVO-b ok"; else echo "SERVO-b fail ($s)"; fi
echo "GPW $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 2500 ]]; then echo "GPW-b ok"; else echo "GPW-b fail ($s)"; fi
echo "servo $GPIO 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SERVO-c ok"; else echo "SERVO-c fail ($s)"; fi
echo "gpw $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "GPW-c ok"; else echo "GPW-c fail ($s)"; fi
echo "w $GPIO 1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SERVO-d ok"; else echo "SERVO-d fail ($s)"; fi
echo "wvclr" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SLR-a ok"; else echo "SLR-a fail ($s)"; fi
echo "slro $GPIO 4800 8" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SLR-b ok"; else echo "SLR-b fail ($s)"; fi
echo "wvas $GPIO 4800 8 2 0 0x6d 0x79 0x20 0x6e 0x61 0x6d 0x65 0x20 0x69 0x73 0x20 0x6a 0x6f 0x61 0x6e" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 95 ]]; then echo "SLR-c ok"; else echo "SLR-c fail ($s)"; fi
echo "m $GPIO w" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SLR-d ok"; else echo "SLR-d fail ($s)"; fi
echo "wvcre" >/dev/pigpio
read -t 1 w </dev/pigout
if [[ $w -ge 0 ]]; then echo "WVCRE ok"; else echo "WVCRE fail ($w)"; fi
echo "wvtx $w" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 191 ]]; then echo "SLR-e ok"; else echo "SLR-e fail ($s)"; fi
sleep 0.4
echo "slr $GPIO 100" >/dev/pigpio
read -t 1 s </dev/pigout
e="15 109 121 32 110 97 109 101 32 105 115 32 106 111 97 110"
if [[ $s = $e ]]
then echo "SLR-f ok"
else echo "SLR-f fail with ($s)"
fi
read -t 1 s </dev/pigout # dump any junk
echo "slrc $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "SLR-g ok"; else echo "SLR-g fail ($s)"; fi
echo "t" >/dev/pigpio
echo "tick" >/dev/pigpio
read -t 1 t1 </dev/pigout
read -t 1 t2 </dev/pigout
s=$((t2-t1))
if [[ $s -gt 0 && $s -lt 5000 ]]
then echo "TICK ok"
else echo "TICK fail ($s)"
fi
pigs w $GPIO 1 # put in known state
echo "trig $GPIO 10 1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "TRIG-a ok"; else echo "TRIG-a fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "TRIG-b ok"; else echo "TRIG-b fail ($s)"; fi
echo "trig $GPIO 10 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "TRIG-c ok"; else echo "TRIG-c fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "TRIG-d ok"; else echo "TRIG-d fail ($s)"; fi
echo "wdog $GPIO 1000" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WDOG-a ok"; else echo "WDOG-a fail ($s)"; fi
echo "wdog $GPIO 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WDOG-b ok"; else echo "WDOG-b fail ($s)"; fi
echo "w $GPIO 1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WRITE-a ok"; else echo "WRITE-a fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "WRITE-b ok"; else echo "WRITE-b fail ($s)"; fi
echo "write $GPIO 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WRITE-c ok"; else echo "WRITE-c fail ($s)"; fi
echo "r $GPIO" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WRITE-d ok"; else echo "WRITE-d fail ($s)"; fi
echo "wvclr" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WVCLR ok"; else echo "WVCLR fail ($s)"; fi
echo "wvas $GPIO 300 8 2 0 0x74 0x68 0x69 0x73 0x20 0x69 0x73 0x20 0x74 0x68 0x65 0x20 0x77 0x69 0x6e 0x74 0x65 0x72 0x20 0x6f 0x66 0x20 0x6d 0x79 0x20 0x64 0x69 0x73 0x63 0x6f 0x6e 0x74 0x65 0x6e 0x74" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 215 ]]; then echo "WVAS ok"; else echo "WVAS fail ($s)"; fi
echo "wvag 16 0 5000000 0 16 5000000" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 216 ]]; then echo "WVAG ok"; else echo "WVAG fail ($s)"; fi
echo "wvcre" >/dev/pigpio
read -t 1 w </dev/pigout
if [[ $w -ge 0 ]]; then echo "WVCRE ok"; else echo "WVCRE fail ($s)"; fi
echo "wvtx $w" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ ($s = 433) || ($s = 977) ]]
then echo "WVTX ok"
else echo "WVTX fail ($s)"
fi
echo "wvbsy" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "WVBSY-a ok"; else echo "WVBSY-a fail ($s)"; fi
sleep 1
echo "wvbsy" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "WVBSY-b ok"; else echo "WVBSY-b fail ($s)"; fi
echo "wvhlt" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WVHLT ok"; else echo "WVHLT fail ($s)"; fi
echo "wvbsy" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WVBSY-c ok"; else echo "WVBSY-c fail ($s)"; fi
echo "wvtxr $w" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ ($s = 433) || ($s = 977) ]]
then echo "WVTXR ok"
else echo "WVTXR fail ($s)"
fi
echo "wvbsy" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1 ]]; then echo "WVBSY-d ok"; else echo "WVBSY-d fail ($s)"; fi
echo "wvhlt" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WVHLT ok"; else echo "WVHLT fail ($s)"; fi
echo "wvbsy" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 0 ]]; then echo "WVBSY-e ok"; else echo "WVBSY-e fail ($s)"; fi
echo "wvsc 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ ($s = 432) || ($s = 743) ]]
then echo "WVSC-a ok"
else echo "WVSC-a fail ($s)"
fi
echo "wvsc 1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s -ge 432 ]]; then echo "WVSC-b ok"; else echo "WVSC-b fail ($s)"; fi
echo "wvsc 2" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 25016 ]]; then echo "WVSC-c ok"; else echo "WVSC-c fail ($s)"; fi
echo "wvsm 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 10000000 ]]; then echo "WVSM-a ok"; else echo "WVSM-a fail ($s)"; fi
echo "wvsm 1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s -ge 10000000 ]]; then echo "WVSM-b ok"; else echo "WVSM-b fail ($s)"; fi
echo "wvsm 2" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 1800000000 ]]
then echo "WVSM-c ok"
else echo "WVSM-c fail ($s)"
fi
echo "wvsp 0" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 216 ]]; then echo "WVSP-a ok"; else echo "WVSP-a fail ($s)"; fi
echo "wvsp 1" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s -ge 216 ]]; then echo "WVSP-b ok"; else echo "WVSP-b fail ($s)"; fi
echo "wvsp 2" >/dev/pigpio
read -t 1 s </dev/pigout
if [[ $s = 12000 ]]; then echo "WVSP-c ok"; else echo "WVSP-c fail ($s)"; fi

View File

@ -0,0 +1,108 @@
<p>Perfect for more complicated molds and better production rates as well good quality with high precision. Easy to
transport and ideal for a educational context and small enterprises.<br>
</p>
<p>
The machine is heavily inspired by the work of <a href="https://www.fosbarcelona.com/">FosBarcelona</a>, formerly known as <a href="http://www.esferica.org/en/">Taller Esferica.</a>
</p>
<hr>
<div>
<div id="specs" style="padding: 16px">
<strong>Technical Information</strong>
<table>
<tbody>
<tr>
<td>Version
</td>
<td>1.3
</td>
</tr>
<tr>
<td> Weight
</td>
<td>40 kg
</td>
</tr>
<tr>
<td> Dimensions - Package
</td>
<td>1100 x 200 x 500 mm
</td>
</tr>
<tr>
<td> Barrel volume
</td>
<td>70 cm³
</td>
</tr>
<tr>
<td> Voltage
</td>
<td>220V
</td>
</tr>
<tr>
<td> AMP
</td>
<td>2.6A
</td>
</tr>
<tr>
<td> Input Flake Size
</td>
<td>Medium, Small
</td>
</tr>
<tr>
<td> License
</td>
<td><a href="https://ohwr.org/cernohl">CERN Open Source Hardware License</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="clear:both">
<div>
<a href="${product_overview}">
<p style="text-align: center">
<img width="100%" src="${product_overview}">
</p>
</a>
</div>
<div style="padding: 16px; display: inline-block">
${product_resources}
</div>
</p>
</div>
<strong>Community builds</strong>
<div class="ty-vendor-plans">
<p class="ty-grid-list__item" style="float:left;border-color:#c5c5c5;width: 300px;display: inline-block">
<img width="300" src="https://bazar.preciousplastic.com/images/companies/24/elena/markz.jpg?1580037715294" />
</p>
<p class="ty-grid-list__item" style="float:left;border-color:#c5c5c5;width: 300px;display: inline-block"> <img
width="300"
src="https://bazar.preciousplastic.com/images/companies/24/elena/umelohmotne_59865422_441042840038598_5468035939138973777_n.jpg?1580037857618" />
</p>
<p class="ty-grid-list__item" style="float:left;border-color:#c5c5c5;width: 300px;display: inline-block">
<img width="300"
src="https://precious-plastic.org/wp-content/uploads/2020/03/com4.jpg" />
</p>
<p class="ty-grid-list__item" style="float:left;border-color:#c5c5c5;width: 300px;display: inline-block">
<img width="300"
src="https://precious-plastic.org/wp-content/uploads/2020/03/com5.jpg" />
</p>
<p class="ty-grid-list__item" style="float:left;border-color:#c5c5c5;width: 300px;display: inline-block">
<img width="300"
src="https://precious-plastic.org/wp-content/uploads/2020/03/com6.jpg" />
</p>
</div>

View File

@ -0,0 +1,13 @@
<div style="padding:16px;text-align: center;">
<h3> See our other products </h3>
<div class="ty-vendor-plans">
${zoe}
${zoex}
${lydia}
${lydia-v4}
${sheetpress}
${shredder_v31}
${hal}
${obelix}
</div>
</div>

View File

@ -0,0 +1,10 @@
<div style="padding:16px;text-align: center;">
<h3> See our other products </h3>
<div class="ty-vendor-plans">
${zoe}
${zoex}
${lydia}
${lydia-v4}
${sheetpress}
</div>
</div>

View File

@ -0,0 +1,29 @@
<div>
<a href="${product_perspective}">
<img src="${product_perspective}" style="margin:8px; float: left;max-width:50%;max-height: 400px;" />
</a>
<span style="font-size: smaller; margin-top: 16px;">
Perfect for more complicated molds and better production rates as well good quality with high precision. Easy
to transport and ideal for a educational context and small enterprises.
</span>
<div style="display: table-cell;">
${mini_specs}
{% include feature_bars.html issues="95" complete="90" safety="80" safety_url="#" %}
{% include machine_toolbar.html download="${download}" preview="${product_3d}" %}
</div>
</div>
<div style="margin: 8px;clear:both">
</div>
<hr />
${products}

View File

@ -0,0 +1,23 @@
<div style="padding:16px;text-align: center;font-size: smaller;">
<h3>Products</h3>
<div class="ty-vendor-plans">
<div class="ty-grid-list__item" style="float:left;border-color: #c5c5c5;width: 200px;display: inline-block">
<a href="https://bazar.preciousplastic.com/moulds/injection-moulds/piranha-clamp/">
<img height="200px" src="/_machines/assets/clamp.jpeg">
<br />
<p style="text-align: center;">Piranha Clamp</p>
</a>
</div>
<div class="ty-grid-list__item" style="float:left;border-color: #c5c5c5;width: 200px;display: inline-block">
<a href="https://bazar.preciousplastic.com/moulds/injection-moulds/water-cup-mould/">
<img height="200px" src="/_machines/assets/watercup.jpeg">
<br />
<p style="text-align: center;">Water Cup</p>
</a>
</div>
{% include bazar_product_thumb.html title="Hair Comb" image="/_machines/assets/comb.jpeg" url="https://bazar.preciousplastic.com/moulds/injection-moulds/hair-comb/" %}
</div>
</div>

View File

@ -0,0 +1,55 @@
<div id="specs" style="padding: 16px">
<strong>Technical Information</strong>
<table>
<tbody>
<tr>
<td>Version
</td>
<td>1.3
</td>
</tr>
<tr>
<td> Weight
</td>
<td>40 kg
</td>
</tr>
<tr>
<td> Dimensions - Package
</td>
<td>1100 x 200 x 500 mm
</td>
</tr>
<tr>
<td> Barrel volume
</td>
<td>70 cm³
</td>
</tr>
<tr>
<td> Voltage
</td>
<td>220V
</td>
</tr>
<tr>
<td> AMP
</td>
<td>2.6A
</td>
</tr>
<tr>
<td> Input Flake Size
</td>
<td>Medium, Small
</td>
</tr>
<tr>
<td> License
</td>
<td><a href="https://ohwr.org/cernohl">CERN Open Source Hardware License</a>
</td>
</tr>
</tbody>
</table>
</div>

View File

@ -0,0 +1,61 @@
<div class="row vertical-2em">
<div class="col">
<h5 class="feature-text">
Auto-Reverse
</h5>
<span class="feature-text">The machine will detect jamming and reverses automatically. </span>
</div>
<div class="col">
<h5 class="feature-text">
Status Lights
</h5>
<span class="feature-text">Visual feedback.</span>
</div>
<div class="col">
<h5 class="feature-text">
Status Lights
</h5>
<span class="feature-text">Visual feedback.</span>
</div>
<div class="col">
<h5 class="feature-text">
Status Lights
</h5>
<span class="feature-text">Visual feedback.</span>
</div>
</div>
<div class="row vertical-2em">
<div class="col">
<h5 class="feature-text">
Auto-Reverse
</h5>
<span class="feature-text">The machine will detect jamming and reverses automatically. </span>
</div>
<div class="col">
<h5 class="feature-text">
Status Lights
</h5>
<span class="feature-text">Visual feedback.</span>
</div>
<div class="col">
<h5 class="feature-text">
Status Lights
</h5>
<span class="feature-text">Visual feedback.</span>
</div>
<div class="col">
<h5 class="feature-text">
Status Lights
</h5>
<span class="feature-text">Visual feedback.</span>
</div>
</div>

View File

@ -0,0 +1,10 @@
<div style="padding:16px;text-align: center;">
<h3> See our other products </h3>
<div class="ty-vendor-plans">
${zoe}
${zoex}
${lydia}
${lydia-v4}
${sheetpress}
</div>
</div>

View File

@ -0,0 +1,6 @@
<div>
<span style="font-size: smaller; margin-top: 16px;">
Autonoumous Bottle Vending Shredder. This machine is designed for public spaces such as schools, bars, restaurants. It comes with a small foot print and runs very quite.
All the user has to do is to drop a bottle and that's it! The machine has lots of sensors and feedback as a touch screen to show it's own metrics but also the overall performance of the network (other units).
</span>
</div>

View File

@ -0,0 +1,23 @@
<div style="padding:16px;text-align: center;font-size: smaller;">
<h3>Products</h3>
<div class="ty-vendor-plans">
<div class="ty-grid-list__item" style="float:left;border-color: #c5c5c5;width: 200px;display: inline-block">
<a href="https://bazar.preciousplastic.com/moulds/injection-moulds/piranha-clamp/">
<img height="200px" src="/_machines/assets/clamp.jpeg">
<br />
<p style="text-align: center;">Piranha Clamp</p>
</a>
</div>
<div class="ty-grid-list__item" style="float:left;border-color: #c5c5c5;width: 200px;display: inline-block">
<a href="https://bazar.preciousplastic.com/moulds/injection-moulds/water-cup-mould/">
<img height="200px" src="/_machines/assets/watercup.jpeg">
<br />
<p style="text-align: center;">Water Cup</p>
</a>
</div>
{% include bazar_product_thumb.html title="Hair Comb" image="/_machines/assets/comb.jpeg" url="https://bazar.preciousplastic.com/moulds/injection-moulds/hair-comb/" %}
</div>
</div>