Go to advanced search

by tony1812
Sat Dec 22, 2018 3:09 pm
Forum: Beginners
Topic: Disable SSH waring.
Replies: 11
Views: 926

Re: Disable SSH waring.

Thank you for the replies. None of the above methods works. Here we go again, some start to lecture about security. I repeat this is a private machine, security is least of my concern, I am not paranoid like some people I don't want to change the password because I would have to remember yet another...
by tony1812
Fri Dec 21, 2018 9:45 pm
Forum: Beginners
Topic: Show ip at boot
Replies: 4
Views: 625

Re: Show ip at boot

Thank everyone.

I like DougieLawson's solution. It shows up in a nice window. Except for the damn SSH warning blocks it :(
by tony1812
Fri Dec 21, 2018 9:37 pm
Forum: Beginners
Topic: Disable SSH waring.
Replies: 11
Views: 926

Disable SSH waring.

I asked this question before but never got an answer. Instead, I got an ear full of security. I am well aware that this is a potential risk. so please don't lecture me, I have Pi 3 with the latest updated Stretch. How can I disable this warning (at least disable this dialog to show up.)? "SSH is ena...
by tony1812
Thu Dec 20, 2018 10:27 pm
Forum: Beginners
Topic: Show ip at boot
Replies: 4
Views: 625

Show ip at boot

Hello, I have a script like this: import socket import fcntl import struct def get_ip_address(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), 0x8915, # SIOCGIFADDR struct.pack('256s', ifname[:15]) )[20:24]) print get_ip_address('lo') pri...
by tony1812
Fri Oct 19, 2018 2:30 pm
Forum: Java
Topic: How to link java program logic to UI in netbeans
Replies: 1
Views: 4073

How to link java program logic to UI in netbeans

Hello. I just started self-taught Java on netbeans. I failed to understand how a program logic is related to the gui. In the code below, I want the user be able to click on a jbutton object, then the code will send a char '1' to the HC-05 serial port. The structure on netbeans is like this attached ...
by tony1812
Fri Oct 05, 2018 11:04 pm
Forum: Beginners
Topic: HC-05 and Pi
Replies: 11
Views: 691

Re: HC-05 and Pi

Thank you all for the quick replies. :) I don't recall I had to play with the PIO11 last time. Under AT+UART mine is 38400,1,0 should it be 38400,0,0? Also on the rx line of the JC-05. do I need a voltage divider? Some tutorial say yes but yet many don't and I don't recall I use it in the last time ...
by tony1812
Fri Oct 05, 2018 10:10 pm
Forum: Beginners
Topic: HC-05 and Pi
Replies: 11
Views: 691

HC-05 and Pi

Hi, A year ago, I was able to get the Pi communicate with an arduino wirelessly through HC-05. But I totally forget how I did it. I got into AT mode set the AT+ROLE = 1(master), but the pi won't detect it. However if I set AT+ROLE =0(slave) the pi detects it immediately. Shouldn't the HC-05 be set t...
by tony1812
Sat Sep 29, 2018 6:15 pm
Forum: Java
Topic: serial communication with java
Replies: 4
Views: 4463

Re: serial communication with java

Haha, I read so many tutorials I fogot where they come from. But definitely not the you links you sent. Thank you for that.I have been trying to look into the methods in Adriuno .jar, that really helps. :)
by tony1812
Sat Sep 29, 2018 4:35 pm
Forum: Java
Topic: serial communication with java
Replies: 4
Views: 4463

Re: serial communication with java

Thanks for the reply. Yes, I did read the link you sent, but I failed to relay it to these two .jars Arduino.jar and jserialcomm.jar. In the Java code since I am using an arduino object -- Arduino a = new Arduino(); I wrote a.serialWrite(num) to send a number to Arduino, shouldn't there be a corresp...
by tony1812
Fri Sep 28, 2018 9:35 pm
Forum: Java
Topic: serial communication with java
Replies: 4
Views: 4463

serial communication with java

Hello, for exercise purpose, I worte a simple code using java to communicate with Arduino. In the Java code, I use arduino.jar and jserialcomm.jar, I could get java to send out command to arduino, 1 turns on a white led, 2 turns on a red led 3 read a string from arduino. The first two work just fine...
by tony1812
Fri Sep 28, 2018 10:21 am
Forum: Java
Topic: python time.sleep(x) in java
Replies: 3
Views: 3685

Re: python time.sleep(x) in java

Please don't give me the attitude. I did google it, I read the same post. but My little understanding is Thread.sleep() has something to do with a thread.. I am wondering if it can be applied to general purpose like time.sleep() in python.

I am not a genius like you. Java is brand new to me.
by tony1812
Thu Sep 27, 2018 11:39 pm
Forum: Java
Topic: python time.sleep(x) in java
Replies: 3
Views: 3685

python time.sleep(x) in java

Hello, in python, when I need to call a delay action, I can use time.sleep(x). What is it in Java?
Thread.sleep() ? Thanks.
by tony1812
Thu Sep 27, 2018 6:30 pm
Forum: Java
Topic: where to put .jar?
Replies: 4
Views: 4069

Re: where to put .jar?

DougieLawson wrote:
Thu Sep 27, 2018 3:26 pm
It needs to be in a folder in your CLASSPATH or -cp when you try to run it. Java will only look for a jar file in folders defined on the CLASSPATH.
That's what I figure.
How do I create this CLASSPATH?
by tony1812
Thu Sep 27, 2018 2:10 pm
Forum: Java
Topic: where to put .jar?
Replies: 4
Views: 4069

where to put .jar?

Hello, I just started to learn java. I have a basic question. I don't want to use any IDEs, I want to use the Terminal to compile my jave code was written in a simple text editor. i wrote which require to import a .jar to the library. when I compile it in terminal, javac XYZ.java, where should the ....
by tony1812
Thu Sep 27, 2018 12:39 pm
Forum: Python
Topic: python on serial port
Replies: 1
Views: 288

python on serial port

Hello. I wrote a very simple piece of code. all it does is when enter a 1 in serial monitor the the LED blinks for 1 second. void setup() { Serial.begin(9600); pinMode(12, OUTPUT); } void loop() { if (Serial.available()) { if(Serial.read()=='1') { digitalWrite(12, HIGH); delay(1000); digitalWrite(12...
by tony1812
Tue Sep 25, 2018 11:42 pm
Forum: Java
Topic: NetBean IDE questions
Replies: 1
Views: 2725

NetBean IDE questions

Hello, I just started to use NetBeans 8.2. I have a project, I would like to add two more .jar to Libraries. Question #1 seems to more related to the Mac, I have two .jar files, somehow they automaticly go into a wired thing called Developer, when I click on it, it turns into a folder called "New Fo...
by tony1812
Tue Sep 25, 2018 11:41 am
Forum: Java
Topic: jseralcomm
Replies: 1
Views: 2208

jseralcomm

Hi, I just started to learn java, I have a silly question, in java when it says import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStream; import gnu.io.CommPortIdentifier; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListen...
by tony1812
Mon Sep 03, 2018 5:22 pm
Forum: Beginners
Topic: strange thing happens (config.txt empty after edit)
Replies: 5
Views: 277

Re: strange thing happens

Hmmm, I realized one thing, I transfer the /boot/config.txt from my pi to my Mac ( my Mac has BBEdit) all the text are intacted. But when I load the same file to my pi3 open it with pi3's text editor or nano or leafpad, all text dispeared. I can only thing it is some king on text encoding the pi doe...
by tony1812
Mon Sep 03, 2018 4:01 pm
Forum: Beginners
Topic: strange thing happens (config.txt empty after edit)
Replies: 5
Views: 277

strange thing happens (config.txt empty after edit)

Hello, I use vnc on Mac to my Pi3, edited the /boot/config.txt, then I use the same SD but boot it up on another pi 3 with a 7" official Pi LCD, the odd thing happened, the /boot/config.txt is all empty, all text are gone, but the pi still boot up. What happen?
by tony1812
Sun Aug 19, 2018 11:59 pm
Forum: Beginners
Topic: Unable to fetch some archives
Replies: 7
Views: 1825

Re: Unable to fetch some archives

I have the same problem the last couple of days. Trying again later seems to work. How much later? Can be minutes or the next day. On and off, when I do update and upgrade, I had similar error messages in the past. I wonder if the problem exist on the repository? Perhaps it is managed by some newbi...
by tony1812
Sun Aug 19, 2018 11:56 pm
Forum: Beginners
Topic: Unable to fetch some archives
Replies: 7
Views: 1825

Re: Unable to fetch some archives

"Last modification reported: Fri, 17 Aug 2018 16:40:06 +0000 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?" Odd... I would expect lines with the actual archives it is trying to read / download, etc... Are you sure *all* the output consists of just those 2 lin...
by tony1812
Sun Aug 19, 2018 9:10 pm
Forum: Beginners
Topic: Unable to fetch some archives
Replies: 7
Views: 1825

Re: Unable to fetch some archives

yea sudo update
sudo upgrade

This is the entire error message
"Last modification reported: Fri, 17 Aug 2018 16:40:06 +0000
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?"
by tony1812
Sun Aug 19, 2018 3:06 pm
Forum: Beginners
Topic: Unable to fetch some archives
Replies: 7
Views: 1825

Unable to fetch some archives

Hello, quit often when I update and grade my pi, I get error like this: Last modification reported: Fri, 17 Aug 2018 16:40:06 +0000 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? Why is that? Is there something wrong with the repository? Is there anything I can...
by tony1812
Mon Jul 16, 2018 3:27 am
Forum: Automation, sensing and robotics
Topic: 16-channel PWM & Servo driver and pi3
Replies: 3
Views: 462

16-channel PWM & Servo driver and pi3

Hello, I am doing a robotic project. I have an old robot wth 12 servos. it was using and Arduino nano with a 16-channel PWM & Servo driver. Now I would like to substitude the Arduino with a Pi3 or Pi zero, as the Pi has a limited hardware PWM, Would it be better to use this 16-channel PWM & Servo dr...
by tony1812
Thu Jun 14, 2018 12:25 pm
Forum: Beginners
Topic: remove/delete all dependencies
Replies: 3
Views: 363

Re: remove/delete all dependencies

Did the install instructions have "make install" or something like that in? Because sometimes there are "make uninstall" options as well. No it doesn't. but it does have a uninstall.sh in it. when I run ./uninstall.sh, seemingly it just remove the desktop icon, I am not sure if it removes every dep...

Go to advanced search