Go to advanced search

by david_1234
Tue Nov 19, 2019 4:01 pm
Forum: General discussion
Topic: using to CanBus on on pi (SPI0 and SPI1)
Replies: 0
Views: 29

using to CanBus on on pi (SPI0 and SPI1)

Hello , wanted to know how can I read data from 2 canbus interfaces at the same time. Right now I'm using this configuration for 1 canbus : /boot/config.txt dtparam=spi=on dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=12 dtoverlay=spi-bcm2835-overlay and this connections GPIO CAN HEADR SIGNAL ...
by david_1234
Mon Nov 11, 2019 10:00 am
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

whould you do it different? (Logic speaking)
Thanks ,
by david_1234
Mon Nov 11, 2019 9:37 am
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

OK - I can do this :-) just to see I got it right on t0 I have column1 , column2 , column3 .... on t1 I have column1_1 , column2_1 , column3_1 then I sub columns1_1-column1 ..... I get a "new" line with 7 values\numbers and from there I do waht I did before? CpuLoad = (100 - ((IdleCPU / TotalCPU) * ...
by david_1234
Mon Nov 11, 2019 8:34 am
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

So this doesn't help me to get to the solution I need either :|

I think Linux moto should be
"Let's make things more complicated....."

so maybe you have any idea how to get the cpu load (the same value I get in the monitor ) ?

Thanks ,
by david_1234
Sun Nov 10, 2019 3:24 pm
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

this is what I did for the last hour finally made this solution according to this explain https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk65143 String CpuFileName = "/proc/stat"; String line = null; String strArray[] = new String[12]; doubl...
by david_1234
Sun Nov 10, 2019 2:15 pm
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

you want me to read ~3100 lines of code? :-)
maybe you can point me to the answer ?

I can only assume you know the answer

Thanks ,
by david_1234
Sun Nov 10, 2019 2:05 pm
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

Ok now I see it but now what ? this is what I ask here https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=247784&p=1562897#p1562897 what do I need to calcualte in order to see the current CPU use? I guess something from this line ? 12705560 1075 1114248 131286844 258837 0 58030 0 0 0 if I take ...
by david_1234
Sun Nov 10, 2019 1:21 pm
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

I don't have this file \ library.
do I need to install something?
by david_1234
Sun Nov 10, 2019 10:12 am
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Re: Unable to read cmd line from sh file using Java

The problem is that the main code is JAVA and I need to keep the answer and do some work with the numbers

I don't want to start using python from java - I think it will complicate things - no ?

isn't better to use only 1 language?


Thanks ,
by david_1234
Sun Nov 10, 2019 9:14 am
Forum: Java
Topic: Unable to read cmd line from sh file using Java
Replies: 19
Views: 419

Unable to read cmd line from sh file using Java

Hello , I'm having a strange problem I'm trying to read the CPU load using this commnad: top -n1 | grep "%Cpu" when I try to use this java code : try { ProcessBuilder GetCPU = new ProcessBuilder ("sudo" , top" ,"-n1","grep" , "%Cpu"); //*2 ProcessBuilder GetCPU = new ProcessBuilder ("sudo" , sh" , "...
by david_1234
Thu Nov 07, 2019 3:09 pm
Forum: Python
Topic: Get pi CPU temp and load
Replies: 15
Views: 1857

Re: Get pi CPU temp and load

OK so can I "trust" the answer I'm getting? meaning that if I get %Cpu(s): 6.8 us, 6.8 sy, 0.0 ni, 86.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st which I take from there only the idle "86.5" meaning beaing use 13.5% the real number is not that importent , I just want to make sure the pi is not "kiling" its...
by david_1234
Thu Nov 07, 2019 1:50 pm
Forum: Python
Topic: Get pi CPU temp and load
Replies: 15
Views: 1857

Re: Get pi CPU temp and load

Sorry for the bump I still can't find an answer for this , how to get the CPU Load. and it can't be that hard - becuase you can see it in the menu as "CPU Usage Monitor", so the number and calculation is there. so it must be a way to reach and get it , no? I understadn correctly this command top -n ...
by david_1234
Tue Nov 05, 2019 9:38 am
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

Everything is OK like the guide Capture.PNG ****** I took this INA219 device and connected it to Arduino as suggested , and there it works and show me the data V\A\P. so no hardware problem for 100% maybe I need to allow \enable soemthing ?? I saw that maybe in old pis there is only 1 i2c pins , and...
by david_1234
Tue Nov 05, 2019 8:58 am
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

I have try to do something else now I jumper A0 and A1 so when I run the scanner I can see this: sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: ...
by david_1234
Mon Nov 04, 2019 4:12 pm
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

what do you wnat me to find ?

I have try with and without the external power - if this is what you mean

still the same thing - get nothing after the
"Hello!"
by david_1234
Mon Nov 04, 2019 4:08 pm
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

I found Arduino Ethernet here use this code: #include <Wire.h> #include <Adafruit_INA219.h> Adafruit_INA219 ina219; void setup(void) { Serial.begin(115200); while (!Serial) { // will pause Zero, Leonardo, etc until serial console opens delay(1); } uint32_t currentFrequency; Serial.println("Hello!");...
by david_1234
Mon Nov 04, 2019 4:03 pm
Forum: Beginners
Topic: unable to downlaod from git using pip?
Replies: 2
Views: 173

Re: unable to downlaod from git using pip?

because I found somewhere that this is the pip port use and ping github.com PING github.com (140.82.118.4) 56(84) bytes of data. 64 bytes from lb-140-82-118-4-ams.github.com (140.82.118.4): icmp_seq=1 ttl=49 time=99.4 ms 64 bytes from lb-140-82-118-4-ams.github.com (140.82.118.4): icmp_seq=2 ttl=49 ...
by david_1234
Mon Nov 04, 2019 2:51 pm
Forum: Beginners
Topic: unable to downlaod from git using pip?
Replies: 2
Views: 173

unable to downlaod from git using pip?

Hello , I'm having a strange problem - and maybe I'm missing something I have install a a clean pi4 with buster after setup finish , I have run a update&&upgrade - then reboot the pi then I try to downlaod this sudo pip install git+git://github.com/chrisb2/pi_ina219.git but I'm getting this error: p...
by david_1234
Mon Nov 04, 2019 2:48 pm
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

Yes ,
Are those pins are soldered into my INA219 breakout board.

I will try to find a arduino here and check if I can see the device , it will take me a few hours I guess
after I will find I will let you know

Thanks (for now)
by david_1234
Mon Nov 04, 2019 2:33 pm
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

found a phone :-)


hope the image is clear to understand
20191104_162623.jpg
20191104_162623.jpg (158.14 KiB) Viewed 459 times
this is the 3rd try
using PI4 with a clean buster (after first setup did only update&upgrade , open SSH\VNC\I2C)
by david_1234
Mon Nov 04, 2019 1:26 pm
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Re: Raspberry Pi INA219 Tutorial problem

My camera phone is not wroking ....
sorry

but I will show you the setup :

VCC - Pin 17 (3.3V)
GND - Pin 39 (GND)
Scl - PIn 5 (SCL)
Dsa- Pin 3 (SDA)

now I'm trying to use the PI4 with buster installed

Thasnk ,
by david_1234
Mon Nov 04, 2019 12:16 pm
Forum: Beginners
Topic: Raspberry Pi INA219 Tutorial problem
Replies: 15
Views: 525

Raspberry Pi INA219 Tutorial problem

I have done everything it said but while I'm trying to run the example code from ina219 import INA219, DeviceRangeError from time import sleep SHUNT_OHMS = 0.1 MAX_EXPECTED_AMPS = 2.0 ina = INA219(SHUNT_OHMS, MAX_EXPECTED_AMPS) ina.configure(ina.RANGE_16V) def read_ina219(): try: print('Bus Voltage:...
by david_1234
Mon Nov 04, 2019 10:27 am
Forum: Beginners
Topic: INA219 problem
Replies: 0
Views: 302

INA219 problem

Hello , I'm trying to use INA219 device to check device volt\amp when I connect the INA219 to the pi for the first time I can see it in the scan : sudo i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: --...
by david_1234
Wed Oct 30, 2019 3:03 pm
Forum: Beginners
Topic: problem installing BlueJ on pi4-buster
Replies: 3
Views: 92

Re: problem installing BlueJ on pi4-buster

Otherwise, if this is the desktop-only release, have you done
Code: Select all

sudo apt update
first?

Could it just be a transient error on a site in the mirrors list?
yes I have try update before

and what can I do if this is the problem?
transient error on a site in the mirrors list?

Go to advanced search