Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hallo all,

 

ich habe mal eine frage zu setChipType des ledBricklets.

unter windows 7 bekomme ich keinen fehler egal ob der stack dieregt am pc angebunden ist oder an meinen pi.

 

sobalt ich aber mein program auf den pi starte bekomme ich immer den fehler:

 

Exception in thread "main" java.lang.NoSuchMethodError: com.tinkerforge.BrickletLEDStrip.setChipType(I)V

        at Zimmersteuerung2.Main.Start(Main.java:169)

        at Zimmersteuerung2.Main.<init>(Main.java:83)

        at Zimmersteuerung2.Main.main(Main.java:72)

 

Zeille:

168 ledStrip.setFrameDuration(50);

169 ledStrip.setChipType(2812);

 

habe dem entsprechen mal zeile 169 weg gelassen so lang das Briklet den typ 2812 gespeichtert hat geht alles wen ich den stack aber resetzt muss es ja neu gesetzt werden das weiderum geht nicht und die leds lassen sich nicht mehr steuern.

habe ich etwas vergessen?

oder ist das ein fehler im java ?

hier noch mal die komplette metode.

ipcon = new IPConnection();

		temp = new BrickletTemperature(UID1, ipcon);
		lcd = new BrickletLCD20x4(UID2, ipcon);
		hum = new BrickletHumidity(UID3, ipcon);
		al = new BrickletAmbientLight(UID4, ipcon);
		rs = new BrickletRemoteSwitch(UID5, ipcon);
		Touch = new BrickletMultiTouch (UID7, ipcon);
		fyM = new BrickletLinearPoti (UID8, ipcon);
		ledStrip = new BrickletLEDStrip(UID9, ipcon); 

					try {
							ipcon.connect(host, port);
						} catch (Exception e1) {
							e1.printStackTrace();
						} 
		try {
		S1=Integer.parseInt(xml.getDose(1));
		S2=Integer.parseInt(xml.getDose(2));
		S3=Integer.parseInt(xml.getDose(3));

		int s = al.getIlluminance();

		setLCD(1, 0, "Lux: " + s / 10.0 + " ");

		int s1 = hum.getHumidity();
		setLCD(2, 0, "RH: " + s1 / 10.0 + " % ");

		int s2 = temp.getTemperature();
		setLCD(0, 0, "in:" + s2 / 100.0 + "C ");
		setLCD(0, 11,houer+":"+min+"  ");
		setLCD(0, 17, weker);
		farbe=xml.getLED();
		setLCD(1,15,farbe+" ");		

		ledStrip.setChipType(2812);
		ledStrip.setFrameDuration(50);

		liht= (short)((255/100)*fyM.getPosition()) ;
		ledStrip.setRGBValues(0, (short)16, r, g, b);

			temp.setTemperatureCallbackPeriod(2000);
			hum.setHumidityCallbackPeriod(2000);
			al.setIlluminanceCallbackPeriod(2000);		
			fyM.setPositionCallbackPeriod(50);
			Touch.setElectrodeConfig((int)(0b0111111111111));
			Touch.setElectrodeSensitivity((short)(80));

			ipcon.enumerate();
			Listener();						
			addlistener();	
		}  catch (Exception e) {
			e.printStackTrace();
		}

   } 

 

bin über jeden forschlag dankbar

gruß masder

Geschrieben
  • Autor

Danke photron,

 

total vergessen das da bei linux das die Bindings nicht im jar fiel erkannt werden.

 

Gruß masder

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.