Pages: [1] 2   Go Down
Author Topic: Arduino Networked Lamp Processing sketch error.  (Read 5835 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. Total newb here. You have been warned.  smiley-mr-green
      When I wrote the processing sketch part of this project, the program highlights the line     
 URL url = new URL9feed);     it tells me that it cannot find a class or type named URL.

In my frustration I went to the page with the code and copy pasted it into a new sketch and I still get the same error.
 Can anyone tell me what is going on? smiley-sweat



Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Two things...

1. This is not a Processing forum.  While you may get lucky and cross paths with someone who can help, I suspect you will find better help faster on a Processing forum.

2. The "9" should be an opening parenthesis...

URL url = new URL ( feed);
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I thought since this is a rather common arduino project that someone might be able to help. I fix that little mistake and have gone over the code again and I still seem to be getting that error.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I fix that little mistake and have gone over the code again and I still seem to be getting that error.

Is this the code you are trying to build...

http://cdn.makezine.com/make/books/getstartedarduino/eg/Example_08A.txt
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yup. Copied and pasted that in and all I get is that error message when I try to run the script.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


It's outside my sphere.

If you don't get a reply after about 12 hours bump this thread.  I'll move it to Networking Interfacing w/ Software on the Computer.
« Last Edit: December 28, 2012, 03:56:43 am by Coding Badly » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bump
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What version of Processing are you using? That sketch compiles fine for me using 1.5.1. It has some issues running, since the font it is looking for doesn't exist, but that's easily corrected, and may not be a problem on your system.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using PROCESSING 2.0b7 (REV 0215).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

DS: Don't feel bad. I am having this same problem. When I worked around the URL based code it then objected to the StringTokenizer immediately below it. It looks like the import is not bringing in libraries the author expected. I've been searching for some help with this but hampered by the idiotic choice of language name -- why didn't they just call it "Programming" to be completely generic?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suggest that both of you install the 1.5.1 version of Processing. The 2.0+ version just doesn't seem to play well with the Arduino (or Windows, apparently).
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Paul: yes, that't the problem (http://arduino.cc/forum/index.php?topic=131981.0). I had problems using both Mac and Windows with 2.07b and 1.51 works like a charm.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey Everyone,

I just joined this site and am reading through that same book.

For anyone searching for this same problem.  You don't have to revert back to older version.

Processing is essentially Java.  You can fix this by importing some Java classes.

here is my import section for that code:

import processing.serial.*;
import java.net.URL;
import java.net.URLConnection;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
Logged

Michigan
Offline Offline
Jr. Member
**
Karma: 0
Posts: 97
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was just working through this same thing. Thanks for the code!  That came in handy.  I'm not familiar with Java or C++, though one time I tried to create a text game using only DOS commands.  lol
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, with the  java classes i've fixed the url problem, but now it can't load the HelveticaNeue-bold font...
Did you have the same problem?
Logged

Pages: [1] 2   Go Up
Jump to: