Go to advanced search

by arraybytes
Wed Mar 29, 2017 2:38 am
Forum: General discussion
Topic: Webio PI and Domain Name!
Replies: 3
Views: 793

Re: Webio PI and Domain Name!

No the port goes at the end of the URL before the sub directory... IE> MyPi.mydomain.com:8080/mydir/myfile.html ^--------------------------------^ is basically like typing 192.168.0.9:8080 you can also add a port forward to your router that has a 80 external to point to the 8080 internal unless you ...
by arraybytes
Tue Mar 28, 2017 11:36 pm
Forum: C/C++
Topic: PC8574 LCD HD44780
Replies: 7
Views: 1065

Re: PC8574 LCD HD44780

Fist of all i am going to assume (for the sake of argument) that your unfamiliar with the I2C functionality. If you know this skip to the code :) first make sure you have i2c development on your Pi. and is enabled on your pi. (Just ignore the python junk :)) https://learn.adafruit.com/adafruits-rasp...
by arraybytes
Tue Mar 28, 2017 11:06 pm
Forum: C/C++
Topic: Passing an array to a function and returning a larger array?
Replies: 9
Views: 1527

Re: Passing an array to a function and returning a larger ar

well took some doing, but i found a way to solve my problem. Returning the new formatted string required a new memory buffer and a pointer to be sent back. Well now i feel like a pro at this stuff :) #include <stdio.h> #include <stdlib.h> int function3(char *message) { int i=0; while (message[i]) { ...
by arraybytes
Mon Mar 27, 2017 11:46 pm
Forum: C/C++
Topic: Passing an array to a function and returning a larger array?
Replies: 9
Views: 1527

Re: Passing an array to a function and returning a larger ar

OK... I have spent the better part of an hour researching and trying to get this to work... and still i get an error when i do. ANYONE? #include <stdio.h> char * Function1(char message[]){ char* Data = function2(*message); int i=0; while(i<15) { printf("%d = %c\n",i,Data[i]); i++; } } char...
by arraybytes
Mon Mar 27, 2017 1:08 pm
Forum: C/C++
Topic: PC8574 LCD HD44780
Replies: 7
Views: 1065

Re: PC8574 LCD HD44780

I have tried a few and have has limited success with each so I am writing my own now. I tried wiringPi but was having compiling issues on minbain so I went with a more direct approach. However I have not seen one that is set up to do multiple displays, but I can see that it would not be hard to impl...
by arraybytes
Mon Mar 27, 2017 12:32 pm
Forum: C/C++
Topic: Passing an array to a function and returning a larger array?
Replies: 9
Views: 1527

Re: Passing an array to a function and returning a larger ar

First sorry for the late resonance, it has been a rough last few days and i have not had time to work on my project. Be careful though, this could easily turn into a memory leak if the original message was dynamically allocated and no other pointer to it has been retained. Also if "free" i...
by arraybytes
Fri Mar 24, 2017 2:31 am
Forum: Troubleshooting
Topic: Pi Zero W identifying as "B Rev 2"
Replies: 20
Views: 8737

Re: Pi Zero W identifying as "B Rev 2"

did you get the W's form the same source?
did you buy them all at the same time?
by arraybytes
Fri Mar 24, 2017 2:27 am
Forum: General discussion
Topic: Webio PI and Domain Name!
Replies: 3
Views: 793

Re: Webio PI and Domain Name!

well if you don't have a static IP at home you will need to see if your host has a DDNS system that is linux compatible to find your Pi when your IP changes. For the basic setup though you just set up your domain to point to your IP, that should be in the hosts settings. you can also create sub doma...
by arraybytes
Fri Mar 24, 2017 2:16 am
Forum: Automation, sensing and robotics
Topic: Battery selection for raspberry pi 3
Replies: 9
Views: 8394

Re: Battery selection for raspberry pi 3

lol i must have been typing when you posted that :lol: :lol: :lol:
by arraybytes
Fri Mar 24, 2017 2:12 am
Forum: Automation, sensing and robotics
Topic: Battery selection for raspberry pi 3
Replies: 9
Views: 8394

Re: Battery selection for raspberry pi 3

well i might be off, it has been years since i have done this type of math. I can check with a colleague tomorrow. someone correct me if i am wrong... (max draw of Pi3) .08 x 24 x 365 = ~700Ah 700Ah x 5v = 3500 watts of power needed if my math is right we are talking a car battery ~300 amp @ 12vdc p...
by arraybytes
Fri Mar 24, 2017 1:42 am
Forum: Media centres
Topic: Picture frame/media centre - one power source?
Replies: 27
Views: 3802

Re: Picture frame/media centre - one power source?

WOW that went south quick... :roll: :roll: :roll: I am assuming that this is a standard 12v display driver... Ok simple solution... Go to your local auto parts store and pick up 2 things... a 12v cigarette lighter socket and a car USB charger. connect the cigarette lighter to the same power source a...
by arraybytes
Fri Mar 24, 2017 1:19 am
Forum: General discussion
Topic: Pi Zero test points
Replies: 7
Views: 7534

Re: Pi Zero test points

nice work, guess i will have do do the same for the W soon... I never thought of making a list for others... i guess i'm selfish. :(
by arraybytes
Fri Mar 24, 2017 1:11 am
Forum: C/C++
Topic: Passing an array to a function and returning a larger array?
Replies: 9
Views: 1527

Passing an array to a function and returning a larger array?

i am working on an LCD display and what I want to do is align the text to the display and extend to second line if the text is longer than the line. My question is when i receive the text for the display in my function it can be shorter or longer than the display i can figure out where and how to br...
by arraybytes
Thu Mar 23, 2017 8:29 pm
Forum: C/C++
Topic: I2c - sending 1 or 2 bytes
Replies: 11
Views: 2496

Re: I2c - sending 1 or 2 bytes

Changed my code a bit to play with your question using the same setup having 4 LEDs light up as a binary counter but now the other 4 pins (p4, p5, p6, p7) are set high each time now by changing my HEX values to 0xFx. i noted my changes with comments. #include <stdio.h> #include <string.h> #include <...
by arraybytes
Thu Mar 23, 2017 7:24 pm
Forum: C/C++
Topic: multithread on rpi 2
Replies: 9
Views: 2381

Re: multithread on rpi 2

You are asking a mouthful in just a few sentences. First of all linux uses the "Completely Fair Scheduler" for thread scheduling. This service will use any downtime on any core to run a process. If a thread is halted it may start a second thread while the first is "waiting" and w...
by arraybytes
Thu Mar 23, 2017 1:18 pm
Forum: C/C++
Topic: MPU 9150 - how to change accelerometer sensitivity?
Replies: 1
Views: 573

Re: MPU 9150 - how to change accelerometer sensitivity?

I looked at the datasheet and by default the chip is set to the highest resolution by default. Perhaps it is something in your program that isn't getting the data fast enough.
by arraybytes
Thu Mar 23, 2017 4:12 am
Forum: Off topic discussion
Topic: Meanwhile in Russia
Replies: 10
Views: 3133

Re: Meanwhile in Russia

Well my Russian isn't that good so i couldn't tell you who has the Pi, however as a security professional i do have to laugh about the complete lack of security there, Anyone have a ladder? I guess a roof on the stores would be to much to ask, but i don't see anything worth stealing :lol: :lol: well...
by arraybytes
Thu Mar 23, 2017 4:02 am
Forum: Beginners
Topic: Newbie
Replies: 6
Views: 1176

Re: Newbie

Welcome to the world of Pi... as you can see i too am new to the forum, however i have had my Pi for years. I still have a model B :lol: I am waiting for my zero W to show up though. The raspberry Pi is a great tool for learning Linux or Electronics, fun for retro gaming, makes a decent media player...
by arraybytes
Thu Mar 23, 2017 3:31 am
Forum: C/C++
Topic: I2c - sending 1 or 2 bytes
Replies: 11
Views: 2496

Re: I2c - sending 1 or 2 bytes

This is the program i used to test the setup... I had 4 LEDs connected to p0->p3 with resistors and a 1 being on for the LED. it isn't clean or error checking other than what you already had, but proof of concept form 1 byte sent to 15 bytes sent to do a simple binary counter. #include <stdio.h> #in...
by arraybytes
Thu Mar 23, 2017 1:55 am
Forum: C/C++
Topic: undefined reference to `wiringPiI2cSetup'?
Replies: 1
Views: 1167

Re: undefined reference to `wiringPiI2cSetup'?

Self Answered.


Turns out the documentation and most examples have "wiringPiI2cSetup" when i looked into wiringPi.c i found that it is wiringPiI2CSetup.

Love it when it is a documentation error.
by arraybytes
Thu Mar 23, 2017 12:17 am
Forum: Troubleshooting
Topic: can't SSH into Pi3
Replies: 2
Views: 833

Re: can't SSH into Pi3

run

Code: Select all

$/etc/init.d/sshd restart.
and see if you get an error
by arraybytes
Thu Mar 23, 2017 12:14 am
Forum: C/C++
Topic: undefined reference to `wiringPiI2cSetup'?
Replies: 1
Views: 1167

undefined reference to `wiringPiI2cSetup'?

i am still new to c and linux but i followed all the help i can find on the internet for why i get this error. when i run my program i get this error: root@minibian:~# gcc LCD.c -o main.o -lwiringPi /tmp/cc5oZLZH.o: In function `main': LCD.c:(.text+0x130): undefined reference to `wiringPiI2cSetup' c...
by arraybytes
Wed Mar 22, 2017 4:39 pm
Forum: C/C++
Topic: I2c - sending 1 or 2 bytes
Replies: 11
Views: 2496

Re: I2c - sending 1 or 2 bytes

I am curious as to what your program is outputting and have you tried to get the error message form write()? EDIT: I looked into the program when i had some time tonight, it seems to work on my PCF8574 with LEDs tied to all 8 outputs. just a thought?... if your trying to turn on an LED and still sen...

Go to advanced search