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

Ich habe mal die Klasse für das LCD20x4-Bricklet ein bisschen erweitert und u.a. eine kleine Laufschriftfunktion eingebaut.

 

Vielleicht kanns ja jemand gebrauchen  :D

 

Anwendung ist relativ einfach:

	public static void main(String[] args) {
	IPConnection ipcon;

	BrickMaster master = new BrickMaster(<UID>);
	BrickletLCD20x4Advanced lcd = new BrickletLCD20x4Advanced(<UID>);

	try {
		ipcon = new IPConnection(host, port);

		// Adding bricks to connection ...
		ipcon.addDevice(master);
		ipcon.addDevice(lcd);

		lcd.backlightOn();

		// Creates a ticker at line 0, position 0 with a step each 500
		// millisecond
		lcd.ticker((short) 0, (short) 0, (short) 7, (short) 500,
				"Voltage on Stack");
		lcd.writeLine((short) 0, (short) 7, ": " + master.getStackVoltage()
				/ 1000.0 + " V");

		// Creates a ticker at line 1, position 0 with a step each 750
		// millisecond
		lcd.ticker((short) 1, (short) 0, (short) 7, (short) 750,
				"Current on Stack");
		lcd.writeLine((short) 1, (short) 7, ": " + master.getStackCurrent()
				/ 1000.0 + " A");

		new Scanner(System.in).nextLine();

		lcd.clearDisplay();
		lcd.backlightOff();

		ipcon.destroy();
	} catch (IOException e) {
		e.printStackTrace();
	} catch (TimeoutException e) {
		e.printStackTrace();
	}
}

 

Happy coding

Gagahhag

BrickletLCD20x4Advanced.java

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.