Go to advanced search

by Noggin01
Mon Mar 13, 2017 5:23 pm
Forum: Other programming languages
Topic: Node.js - File pipe is read only once
Replies: 2
Views: 1487

Re: Node.js - File pipe is read only once

Thank you for the explanation, it does make sense. I've since decided to drop the file pipe and switch to a TCP socket so that I can eventually develop an Android application as well.
by Noggin01
Sat Mar 04, 2017 12:49 pm
Forum: Beginners
Topic: PiZero W - Configure Wifi
Replies: 5
Views: 2574

Re: PiZero W - Configure Wifi

DougieLawson wrote:Why "lite"? Why not plain Raspbian 2017-03-02?
My understanding of "lite" is that it the same thing as non-lite, except that it doens't have X-Server and is intended to be run headless. It allows for a smaller uSD card, lower traffic while updating, and maybe less logging.
by Noggin01
Sun Feb 26, 2017 10:35 pm
Forum: Other programming languages
Topic: Node.js - File pipe is read only once
Replies: 2
Views: 1487

Node.js - File pipe is read only once

Short form of the question: in my node.js code below, I can only read from the file stream once. Why? how do I read from it multiple times? Update: I'm still interested in the question below, regarding how to read from a file pipe multiple times, but overall I am not sure it will impact my project ...
by Noggin01
Thu Feb 23, 2017 1:33 pm
Forum: Beginners
Topic: Making a Web Front End for an Application
Replies: 4
Views: 1870

Re: Making a Web Front End for an Application

Node.js is Nginx implemented in javascript. learn Node.js by working through the tutorials. Is there a certain set of tutorials you'd recommend? I've gone through these (https://www.tutorialspoint.com/nodejs/) and have a very basic understanding of what I can do at this point. Do you want to write ...
by Noggin01
Thu Feb 23, 2017 3:29 am
Forum: Beginners
Topic: Making a Web Front End for an Application
Replies: 4
Views: 1870

Making a Web Front End for an Application

I've written a program that controls a servo as well as monitors and reports temperature data. I currently use SSH to get in to my RPi and launch the application. I then can type commands into the application to control it. However, I want to make this easily accessible by adding a web front end. Ab...
by Noggin01
Wed Mar 04, 2015 1:44 pm
Forum: Networking and servers
Topic: Raspberry-Wifi-Router project
Replies: 68
Views: 21927

Re: Raspberry-Wifi-Router project

Hi, I guess your best bet for diagnosis would be to check your sys log. tail -n 50 /var/log/syslog and /var/log/messages It will give u logging information which might help u with your issue. The culprit in your case might be the ifplugd daemon which is reconfiguring stuff on detection of link stat...
by Noggin01
Tue Mar 03, 2015 7:44 pm
Forum: Networking and servers
Topic: Raspberry-Wifi-Router project
Replies: 68
Views: 21927

Re: Raspberry-Wifi-Router project

This isn't quite related to your post, but I'm hoping you can help me as it relates to an issue I was having. I'm trying to make an Ethernet / WiFi bridge because I just bought an Ethernet / USB printer without WiFi. The WiFi adapter I have has an rtl8188eu chipset I believe (rtl8188ee is on the lis...
by Noggin01
Sun Mar 01, 2015 7:44 pm
Forum: General discussion
Topic: Eth0 to Wlan0 Bridge is Unstable
Replies: 0
Views: 369

Eth0 to Wlan0 Bridge is Unstable

I have a few RPi's that I'm not using and saw a good deal on a Ethernet printer. I bought the printer with the intention of using an RPi as a wlan0 to eth0 bridge. I spent most of yesterday trying to get the bridge to work properly. I'm using an RPi B+ with TP-Link TL-WN725N ver2.1 USB WiFi adapter....
by Noggin01
Sun Jul 20, 2014 12:11 pm
Forum: General discussion
Topic: Choosing new SD or USB for operation
Replies: 0
Views: 442

Choosing new SD or USB for operation

I spent several hours over the last couple of days learning a huge amount of stuff regarding hosting multiple web pages on my RPi. Oh my God though... it is SOOO SLOW! I had read that using a USB flash drive can significantly boost the speed of the system, so I pulled my 8GB flash drive out of cold ...
by Noggin01
Fri Jul 18, 2014 1:25 pm
Forum: General discussion
Topic: RaspberryPi, Two Domain Names, Two Wordpress Sites?
Replies: 7
Views: 4740

Re: RaspberryPi, Two Domain Names, Two Wordpress Sites?

Sweet! Thanks everyone! And Wordpress is happy having two different, unrelated sites, with different themes as well? Man, it will be so nice to do this. Last host had a 2 MByte upload file size restriction and my wife wants to post a ton of 2.5 to 3 MByte videos. Getting something that worked well a...
by Noggin01
Fri Jul 18, 2014 11:03 am
Forum: General discussion
Topic: RaspberryPi, Two Domain Names, Two Wordpress Sites?
Replies: 7
Views: 4740

RaspberryPi, Two Domain Names, Two Wordpress Sites?

I had two web sites, both were Wordpress based sites and both were hosted with a webhost that just suddenly turned off their service (little more to it than that, but honestly it doesn't matter to this question.) Both of my sites were very low traffic, one is used basically as a way for my wife to a...
by Noggin01
Mon Jul 14, 2014 12:27 pm
Forum: C/C++
Topic: Program Crashing if Using PHP to Read FIFO
Replies: 2
Views: 1262

Re: Program Crashing if Using PHP to Read FIFO

I appear to have been getting SIGPIPE errors indicating a broken pipe which would cause my system to crash. I've modified the code to ignore broken pipes on the read pipe service routine as well as the write pipe service routine. I have an error pipe, but I haven't implemented it. When I do, I suspe...
by Noggin01
Sun Jul 13, 2014 1:12 pm
Forum: C/C++
Topic: Program Crashing if Using PHP to Read FIFO
Replies: 2
Views: 1262

Re: Program Crashing if Using PHP to Read FIFO

First, I need to preface this question by stating I am on vacation and really can only access this forum semi-reliably in the morning, before my wife wakes up and tells me my only form of fun is going to the beach... not "working" on my Pi. I may be able to check on my phone throughout the day, but ...
by Noggin01
Sun Jul 13, 2014 1:10 pm
Forum: C/C++
Topic: Program Crashing if Using PHP to Read FIFO
Replies: 2
Views: 1262

Program Crashing if Using PHP to Read FIFO

I somehow broke the code tags in the first post of this thread. I copied my post to a reply and code tags worked with no changes. Please see my original post copied as a response below.
by Noggin01
Fri Jun 20, 2014 12:50 pm
Forum: C/C++
Topic: PiGPIO and SPI - Need a bit of help using the pipes
Replies: 7
Views: 2667

Re: PiGPIO and SPI - Need a bit of help using the pipes

That sounds like a plan, thanks joan! I'll take a look at the source code and modify it as you suggest.
by Noggin01
Fri Jun 20, 2014 2:11 am
Forum: C/C++
Topic: PiGPIO and SPI - Need a bit of help using the pipes
Replies: 7
Views: 2667

Re: PiGPIO and SPI - Need a bit of help using the pipes

Ok. I'm officially stuck. I've spent almost 8 hours on this today and can't quite figure it out... static int Tlc1543_Transfer( char* pData, int length ) { FILE *pigpio_write; FILE *pigpio_read; char* write_data = pData; char* read_data = pData; int pigpio_handle; int pigpio_response = 0; int result...
by Noggin01
Thu Jun 19, 2014 11:05 pm
Forum: C/C++
Topic: PiGPIO and SPI - Need a bit of help using the pipes
Replies: 7
Views: 2667

Re: PiGPIO and SPI - Need a bit of help using the pipes

Think I'm getting closer. This is what I'm doing now: printf("SPI Handle: %d\n", pigpio_handle); fprintf(pigpio_write, "spix %u 0x00 0x00\n", pigpio_handle); fflush(pigpio_write); fscanf(pigpio_read, "%c%c%d", &data_read[0], &data_read[1], &pigpio_response); printf("SPI Read: %02X%02X %d\n", data_re...
by Noggin01
Thu Jun 19, 2014 9:41 pm
Forum: C/C++
Topic: PiGPIO and SPI - Need a bit of help using the pipes
Replies: 7
Views: 2667

PiGPIO and SPI - Need a bit of help using the pipes

Over the last day or two I've been trying to redo some of my program to remove the need to run it as sudo. With help from joan and jojopi, I was able to learn how to communicate over pipes to control the servo. Now, I'm trying to use the pipes to control SPI. This code seems to be working, though I ...
by Noggin01
Wed Jun 18, 2014 5:24 pm
Forum: C/C++
Topic: pigpio - Error writing to Pipe
Replies: 9
Views: 2077

Re: pigpio - Error writing to Pipe

It works :) int Servo_Init( void ) { int result = 0; int response; FILE *servo = fopen("/dev/pigpio", "w"); if (servo == NULL) { printf("Error opening file: /dev/pigpio - %s.%u\n", __FILE__, __LINE__); result = -1; } else { fprintf(servo, "s 18 0\n"); fflush(servo); fclose(servo); // read result fro...
by Noggin01
Wed Jun 18, 2014 1:13 pm
Forum: C/C++
Topic: pigpio - Error writing to Pipe
Replies: 9
Views: 2077

Re: pigpio - Error writing to Pipe

Did you take on board jolopi's comment. I did read it, but I'm not sure I understood it. It looked like he was saying to open the pipe with fopen instead of popen, but then he showed example code using popen. In any case, based on your latest response, I believe that I should be treating it as a fi...
by Noggin01
Wed Jun 18, 2014 12:30 pm
Forum: C/C++
Topic: pigpio - Error writing to Pipe
Replies: 9
Views: 2077

Re: pigpio - Error writing to Pipe

FILE *fp = popen("/dev/pigpio s 18 0", "w"); popen() is for opening a pipe to a newly-started command. For example: FILE *fp = popen("/usr/bin/sort", "w"); fputs("one\n", fp); fputs("two\n", fp); fputs("three\n", fp); pclose(fp); /dev/pigpio is not a command, it is a fifo special file (named pipe)....
by Noggin01
Wed Jun 18, 2014 12:25 pm
Forum: C/C++
Topic: pigpio - Error writing to Pipe
Replies: 9
Views: 2077

Re: pigpio - Error writing to Pipe

The pigpio library still needs to be running. The pipe is created when the library is started. What you probably ought to do is start the library as a daemon, i.e. sudo pigpiod at boot-up or at the start of your session. The library will then be resident in memory. You can then communicate with the...
by Noggin01
Wed Jun 18, 2014 1:07 am
Forum: C/C++
Topic: pigpio - Error writing to Pipe
Replies: 9
Views: 2077

pigpio - Error writing to Pipe

I've written a program that does some servo controlling using the pigpio library. I was successfully using functions "gpioServo()" to write values to the servo. However, in order to do this, I had to use gpioInitialise() which requires sudo privileges. I'm trying to update the code to not require su...
by Noggin01
Mon Jun 16, 2014 5:48 pm
Forum: Automation, sensing and robotics
Topic: Move from SSH control to Web Control
Replies: 3
Views: 1587

Re: Move from SSH control to Web Control

I'll check out "nohup" and "screen", they sound like they would be very beneficial, thanks!

All of my code is written in C
by Noggin01
Fri Jun 13, 2014 1:04 pm
Forum: Automation, sensing and robotics
Topic: Adding a 5v device to a A2D converter with a 3.3V reference
Replies: 9
Views: 2872

Re: Adding a 5v device to a A2D converter with a 3.3V refere

Ahem with Vref of 3V3 it is for 30mV in counts = 30mV * 1023 / 3.3 = 9 Oops, you're right. I came up with a range of 9 to 16 counts, roughly 90 to 160 counts with a gain of 10, and a range of 900 to 1600 roughly with a gain of 100. Of course, 1600 is out of range of the ADC and I thought, "Oh, wron...

Go to advanced search