Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| software:deep:ide:deep_eclipse_serialout [2012-04-04 11:28] – angelegt graf | software:deep:ide:deep_eclipse_serialout [2012-12-08 13:18] (aktuell) – gelöscht graf | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Using serial out(System.out) ====== | ||
| - | - By right-clicking on the newly created package choose //New// -> //Class// and enter class name // | ||
| - | - Open class and enter source code:< | ||
| - | package ch.ntb.stud.yourName.helloworld; | ||
| - | import java.io.PrintStream; | ||
| - | import ch.ntb.inf.deep.runtime.mpc555.driver.SCI1; | ||
| - | |||
| - | public class HelloWorld { | ||
| - | static { | ||
| - | // 1) Initialize SCI1 (9600 8N1) | ||
| - | SCI1.start(9600, | ||
| - | |||
| - | // 2) Use SCI1 for stdout | ||
| - | System.out = new PrintStream(SCI1.out); | ||
| - | |||
| - | // 3) Say hello to the world | ||
| - | System.out.println(" | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | - Open project file: HelloWorld.deep | ||
| - | - Add the newly created class to rootclasses:< | ||
| - | libpath = " | ||
| - | rootclasses = " | ||
| - | }</ | ||
| - | - Connect hardware to PC and power on. | ||
| - | - Open View Dialog under //Window -> Show View -> Other...//. \\ {{software: | ||
| - | - In the category // | ||
| - | - Under // | ||
| - | - Mark project file " | ||
| - | - The //USB Log// shows //Hello, World//. | ||
| - | - With {{software: | ||