Go to advanced search

by ewaller
Wed Oct 26, 2016 6:28 pm
Forum: Troubleshooting
Topic: Unable to delete directory
Replies: 9
Views: 2762

Re: Unable to delete directory

karrika wrote:Before you decide to delete it you could have a look if it is a mount point....
My guess is that this lives in /media/pi/091c1e96-1ff1-4e62-980e-5d1193cf7ae4 and it happens to by the removable disk itself.
That is an excellent point.
by ewaller
Wed Oct 26, 2016 5:39 pm
Forum: Troubleshooting
Topic: Unable to delete directory
Replies: 9
Views: 2762

Re: Unable to delete directory

Where is that directory? ( / /home ~ ) if, if, if you know you really want to get rid of that directory, you could use sudo rm -rf 091c1e96-1ff1-4e62-980e-5d1193cf7ae4 BUT. That is a dangerous command if you type it wrong. The -rf means recursive and to force it. sudo says you have root's permission...
by ewaller
Thu Oct 20, 2016 3:19 pm
Forum: Automation, sensing and robotics
Topic: Pullup vs Pulldown - Reliability With Long Wire Runs
Replies: 9
Views: 1650

Re: Pullup vs Pulldown - Reliability With Long Wire Runs

For the thermostats, definitely use a series resistor -- especially if you have a capacitor across the line. The reed relays used in some thermostats can literally weld themselves shut if they try to dump a capacitor without something to limit the current. Again, long wires mitigate this as well bec...
by ewaller
Thu Oct 20, 2016 3:44 am
Forum: Automation, sensing and robotics
Topic: Pullup vs Pulldown - Reliability With Long Wire Runs
Replies: 9
Views: 1650

Re: Pullup vs Pulldown - Reliability With Long Wire Runs

Yeah, I agree 10nF to 100nF is a good idea -- especially if we are concerned with picking up wifi, garage door openers, microwave ovens, etc... I went with the large cap thinking about trying to minimize 50/60Hz stuff coupling onto the lines. Although the values I picked don't generate an RC constan...
by ewaller
Thu Oct 20, 2016 2:19 am
Forum: Automation, sensing and robotics
Topic: Pullup vs Pulldown - Reliability With Long Wire Runs
Replies: 9
Views: 1650

Re: Pullup vs Pulldown - Reliability With Long Wire Runs

Mandatory: Use a strong pull-up at the input on Ras-pi end. (1k to 5k or so) Really good idea, if at all possible: Use twisted pair -- about 1 twist per centimeter or two If there are problems with noise: You might try putting 10uF to 100uF across the input and ground right at the input along with 1...
by ewaller
Tue Oct 18, 2016 8:25 pm
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 19424

Re: How would you ...... in C ?

[email protected] ~ 1009 %cat move.c #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX_SIZE 10 typedef struct {int dx; int dy;} deltaStruct; typedef struct {int x; int y;} location; static struct {char* command; deltaStruct delta;} DecoderRing[]= { {"forward" ,{ 1 , 0 }}, {"back" ...
by ewaller
Tue Oct 18, 2016 4:21 pm
Forum: C/C++
Topic: How would you ...... in C ? (+ other C discussions)
Replies: 187
Views: 19424

Re: How would you ...... in C ?

[email protected] ~ 1005 %cat ampm.c #include <stdio.h> void convert(int x) { printf("%i %cM\n",x?(x<13)?x:x-12:12,(x<12)?'A':'P'); } int main(int argc, char **argv) { int i; for (i=0; i<24 ; i++) convert(i); } [email protected] ~ 1006 %gcc ampm.c [email protected] ~ 1007 %./a.out 12 AM 1 AM 2 AM 3 AM 4 AM ...
by ewaller
Mon Oct 17, 2016 5:29 pm
Forum: Beginners
Topic: How to set a Variable inside a Function
Replies: 9
Views: 1184

Re: How to set a Variable inside a Function

There are a couple ways to do what you need. The most Pythonic would be to organize the functions that need access to the variable into a class, then make it a class variable. The more intuitive route for those learning python would be to declare the variable at the beginning of the program outside ...
by ewaller
Mon Oct 17, 2016 4:15 pm
Forum: Automation, sensing and robotics
Topic: EMI suppression for inductive AC loads
Replies: 7
Views: 1580

Re: EMI suppression for inductive AC loads

One further possibility is to only switch the relay when the AC voltage passes through 0. You might be able to track the phase via an voltage divider and ADC and time your controls to the zero crossing, or you can get relays that will do it for you automatically. Search for 'zero crossing relays'. ...
by ewaller
Wed Oct 12, 2016 8:22 pm
Forum: Raspbian
Topic: Powershell for Raspbian?
Replies: 33
Views: 10159

Re: Powershell for Raspbian?

DougieLawson wrote:.... when Ubuntu's bash is natively installable ...
Whose Bash? Come on, credit where credit is due.
by ewaller
Wed Oct 12, 2016 2:53 pm
Forum: Other projects
Topic: powering question
Replies: 5
Views: 2521

Re: powering question

It is a switching regulator and they claim a (max) efficiency of 96%. I doubt you will just happen to hit that sweet spot in the operation curve, so let's assume the efficiency is 90%. At the max continuous output current (3A) the output power will be 15W. That means the module will be dissipating 1...
by ewaller
Tue Oct 11, 2016 8:58 pm
Forum: HATs and other add-ons
Topic: Gertbot (Heatsinks) and Stepper Motors getting very hot
Replies: 16
Views: 9256

Re: Gertbot (Heatsinks) and Stepper Motors getting very hot

... A quick google for the specs of the motor shows 12VDC @ 1.7A max http://www.jameco.com/z/STP-42D201-37-Shinano-Kenshi-12-Volt-1-8-Step-Angle-Bipolar-Stepper-Motor_2158531.html So by trying to run it at 3.3V you are trying to draw potentially 6.2A (stall condition) from 3.3V!!!! Um, it does not ...
by ewaller
Tue Oct 11, 2016 4:33 pm
Forum: Troubleshooting
Topic: How to monitor threads activities
Replies: 4
Views: 1951

Re: How to monitor threads activities

joan wrote:Use top
Or, IMHO even better, htop
by ewaller
Tue Oct 11, 2016 4:02 pm
Forum: Raspbian
Topic: How to place a file into root on Raspbian?
Replies: 2
Views: 489

Re: How to place a file into root on Raspbian?

The command sudo

Code: Select all

sudo cp path/to/the/file /theDestination 
by ewaller
Mon Oct 10, 2016 9:45 pm
Forum: Other projects
Topic: Power supply to reuse 19 volt power pack
Replies: 12
Views: 2232

Re: Power supply to reuse 19 volt power pack

This (a little pricey) evaluation kit would do this out-of-the-box

http://www.digikey.com/product-detail/e ... ND/4288725
by ewaller
Mon Oct 10, 2016 6:54 pm
Forum: Automation, sensing and robotics
Topic: DIY IR beam break
Replies: 23
Views: 5263

Re: DIY IR beam break

I am coming to this a bit late, sorry. It turns out you can drive an IR LED very hard for a short period of time. I don't know how those Adafruit sensors are configured, but, in general, you can drive an LED at high current for a several 10s of microseconds followed by leaving them off for 10s of mi...
by ewaller
Mon Oct 10, 2016 6:26 pm
Forum: Other projects
Topic: Power supply to reuse 19 volt power pack
Replies: 12
Views: 2232

Re: Power supply to reuse 19 volt power pack

You absolutely want to use a switcher (as suggested above) instead of a linear regulator. Linear regulators are great as long as you are only dropping a low voltage across them. 19 Volts down to 5 Volts is a 14V drop. 14V at 2 A is 28W. There is no way you could easily cool that and you efficiency w...
by ewaller
Mon Oct 10, 2016 6:11 pm
Forum: General discussion
Topic: Rotary Encoder
Replies: 7
Views: 1779

Re: Rotary Encoder

If you want to be completely safe -- and you don't want to tie the external power supply ground to the Raspberry Pi ground, you can use optoisolators

http://www.arunet.co.uk/tkboyd/ec/ec1optoiso.htm
by ewaller
Mon Oct 10, 2016 6:01 pm
Forum: General discussion
Topic: Opinion on Using Pi 3 with APM 2.6 on Quadcopter
Replies: 4
Views: 1208

Re: Opinion on Using Pi 3 with APM 2.6 on Quadcopter

I don't know anything about the flight controller. My only comment on the RasPi 3 is that it has a substantial appetite for power what with all its cores and RAM. You will certainly want to shut down the GPU. Are you going to be using the wifi and bluetooth? if not, you will want to shut down those ...
by ewaller
Thu Oct 06, 2016 8:59 pm
Forum: General programming discussion
Topic: Best code editor for ye HTML, CSS and JavaScript
Replies: 31
Views: 24015

Re: Best code editor for ye HTML, CSS and JavaScript

I could be wrong but I suspect EMACS and Vim and all the others do not come close to doing what Atom, Sublime and VS Code do. You would be surprised. In all seriousness, they both have syntax highlighting, code completion (including introspection), integration with version control tools, integratio...
by ewaller
Thu Oct 06, 2016 8:40 pm
Forum: Python
Topic: datetime combine driving me mad
Replies: 2
Views: 702

Re: datetime combine driving me mad

You said import datetime from datetime import datetime, date, time, timedelta midnight=datetime.combine(datetime.now(),datetime.time(0,0,0)) The problem here is that you are importing datetime which has classes datetime and time. Then you import datetime (from datetime) and time (from datetime) But ...
by ewaller
Thu Oct 06, 2016 4:02 pm
Forum: Beginners
Topic: stepper motor
Replies: 10
Views: 1352

Re: stepper motor

... Or an absolute shaft encoder.

https://en.wikipedia.org/wiki/Rotary_encoder
by ewaller
Wed Oct 05, 2016 11:48 pm
Forum: C/C++
Topic: Generate a variable in an included file - keep it for others
Replies: 9
Views: 1074

Re: Generate a variable in an included file - keep it for ot

Another way to handle this (and in my opinion a better way) is to not expose the variable in a .h file, but rather to keep it static and only available within the source file in which it is defined. Then, provide a function that returns the value of that variable and expose the function to the outsi...
by ewaller
Wed Oct 05, 2016 5:26 pm
Forum: Automation, sensing and robotics
Topic: Question about about servos (jitter/buzzing/struggling)
Replies: 11
Views: 1921

Re: Question about about servos (jitter/buzzing/struggling)

I won't be able to see the video until I get home tonight.
What happens if you take the current sense out of the circuit and shunt it? I'm wondering if is creating enough IR drop on the power rail to the servo to cause the servo to get squirrelly

Go to advanced search